This class checks the permissions for the current logged in user.
When multiple roles are enable, if any role has the requested permission, it means the user is authorised to do it.
Alias to Nos\User\Permission::exists
Check whether a permissions exists (against all the roles of the current logged in user).
Parameters: |
|
---|---|
Returns bool: | true or false |
Alias to Nos\User\Permission::exists with the optional parameter $alowEmpty = true.
Parameters: |
|
---|---|
Returns bool: | true or false |
Check against a binary permission (without categories) against all the roles of the current logged in user.
Parameters: |
|
---|---|
Returns bool: | true or false |
Check against a numeric / range permission (for all the roles of the current logged in user).
You can use string for the 2nd and 3rd parameters, they will be casted to (int). i.e. '2_write' === 2.
Parameters: |
|
---|---|
Returns bool: | true or false |
Check against a numeric / range permission (for all the roles of the current logged in user).
You can use string for the 2nd and 3rd parameters, they will be casted to (int). i.e. '2_write' === 2.
Parameters: |
|
---|---|
Returns bool: | true or false |
List all the categories of a given permission name (merged values from all the roles of the current logged in user).
Returns an array of string or false when access is denied, or the permission name does not exists.
Parameters: |
|
---|---|
Returns array|false: | |
An array containing the list of categories (values) for the requested permission name |
Check whether a user can access a particular application
Parameters: |
|
---|
See also
Returns an array of all the contexts the user can access.
See also
Returns an array of all the locales the user can access.
See also
Returns an array of all the sites the user can access.