Pre-/post-processing permits macroPostprocessing macroMacro: {permit:<permit name>}<block>{permit:~<permit name>}Requires: permits::permits_view package This macro shows block <block> for all users who have permit <permit name>. And it will be hidden for all other users (who have no permit <permit name>). Example:
{permit:admin}Some text for admin's only{permit:~admin} {permit:public}Some text for every user{permit:~public} Macro:{permit_list}
This macro outputs comma separated list of all possible permits. Example:
Possible permits : {permit_list} Macro:{permit_list_for_object:object=<object name>;type=<object type>}
This macro outputs comma separated list of all possible permits for the defined object. Here <object name> is a name of the object for wich we are outputting permit list. And <object type> is a type of the object. It can be equal to 'user', 'page' , 'menu' or 'group'. Example:
{permit_list_for_object:object=admin;type=user} {permit_list_for_object:object=developer;type=group} {permit_list_for_object:object=main;type=menu} {permit_list_for_object:object=index;type=page} If a user has no permit 'permit_manager' then this macro will be replaced with an empty string. Macro:{group_list_for_user:user=<user login>}
This macro outputs comma separated list of all groups for the defined user. Example:
{group_list_for_user:user=admin} If a user has no permit 'permit_manager' then this macro will be replaced with an empty string. Macro:{permit_list_widget:all=<all permits>;object=<objects permits>}
This macro outputs widget for manipulating object's permits. Example:
{permit_list_widget:all=admin,registered,public;object=admin,permit_manager,user_manager} If a user has no permit 'permit_manager' then this macro will be replaced with an empty string. Macro:{group_list_widget:user=<user login>}
This macro outputs widget for manipulating object's permits. Example:
{group_list_widget:user=admin} {group_list_widget:user=public} If a user has no permit 'permit_manager' then this macro will be replaced with an empty string. |
2009 © ultimix |