Authentification checker loop
The Auth loop perform authorisation checks against the current user. This loop returns nothing if the authorization fails, or the loop contents if it succeeds.
You may check in the front office if an administrator is logged in, and perform specific functions in your front-office template (such as direct editing, for example).
Important informations :
* : argument is required
** : at least one of ** marked argument is required
Loop arguments
Argument | Description |
---|---|
access |
A comma separated list of access, . If empty or missing, the authorization is checked against the roles only
Expected values :
|
module |
A comma separated list of modules |
resource |
A comma separated list of resources |
role * |
A comma separated list of user roles example : role="ADMIN" or can be role="CUSTOMER" |
Loop outputs
Variable | Description |
---|
I want to check if current administrator is allowed tu use the back-office search function.
The role is ADMIN, which mean that the current user should have the "ADMIN" role.
The permission is "admin.administrator", which is the identifier of the administrator permission.
According to the access attribute, the current user should have the CREATE permission.
I want to check if the customer is logged in, or not.