You should never forget that if a template is correctly built, no macro can appear in the web page of the end user.About the user rights, maybe it is simpler to have a predefined group called "Administrators" in HFS and assign the users to this group.
The macro {.if|{.get|is admin.}|Pew|Pew.} would than check if the user is member of this group.
memberof macro is coming
http://www.rejetto.com/forum/index.php?topic=6589.msg1040242#msg1040242
It is already possible to use the following macro:
{.if|{.account linked|administration.}| do action| else do error.}
You have to create an account(group) 'administration' without password and without rights on directories, this account is used only for the admin panel.
Other solution is the use of a macro
{.! Admins.}{.if|{.is substring|;%user%;|;{.!admins.};.}| then do action| else do error.}
[special:strings]
admins=mars;rejetto;silentpliz; ...... // list of accounts allowed as admin
With this last one, you are not limited to the connected user the by replacing %user% by another account.
The problem with the first version ({.account linked|...) is that an 'administration' account can link another account to the 'administration' group.
To remedy it, it is enough to use the combination of both macro as follows:
{.if|{.and|%user%|{.account linked|administration.}|{.is substring|;%user%{.! Admins.};.}/and.}|
then do action | else do error.}
[special:strings]
admins=mars;rejetto;silentpliz; ...... // list of accounts allowed as admin
Only the accounts referenced in the section can use the admin panel, and one of these accounts can be easily invalidated by removing him from the administrator group, and if accidentally an account is linked to the administrator group, he cannot have access to the admin panel if his name is not a part of the list of admins.
It is more binding but a double security is better than a stupid hacking.
If the use of the list of the accounts does not please you in the main template, you can replace the macro
{.!admins.} by the macro following one:
{.section|admins|admins.txt.} into admins.txt ( in the same folder as hfs.exe) you will find the section
[admins]
mars;rejetto;silentpliz; .....
At the end, we obtain:
{.if|{.and|%user%|{.account linked|administration.}|{.is substring|;%user%;|;{.section|admins|admins.txt.};.}/and.}|
then do action | else do error.}
or with /folderx/admins.txt
{.if|{.and|%user%|{.account linked|administration.}|{.is substring|;%user%;|;{.dequote|{.section|admins|/folderx/admins.txt.};.}/dequote.}/and.}|
then do action | else do error.}
admins.txt
[admins]
mars;rejetto;silentpliz; .....