cancel
Showing results for 
Search instead for 
Did you mean: 

How to check if Admin in ftl?

miraclesuki
Champ in-the-making
Champ in-the-making
Hello,

I would like to ask how can I check the current user is logged as Admin or not?
I am editing a .html.ftl file and I would like to know is it there exist something like:

<#if getCurrentUser.isAdmin>
…….
…..
</#if>

I cannot find any resource stated how to check the user whether isAdmin or not…
Any advise on it is appreciated.

Thanks for help.

Regards
Mandy
3 REPLIES 3

jpfi
Champ in-the-making
Champ in-the-making
hi,

simply
<#if user.isAdmin>…</#if>

cheers, jan

miraclesuki
Champ in-the-making
Champ in-the-making
hi,

simply
<#if user.isAdmin>…</#if>

cheers, jan

Work prefectly, Great!

By the way, I would like to ask which document can I refer to find this solution or where can I know those condition?
Thanks!

Regards
Mandy

jpfi
Champ in-the-making
Champ in-the-making