PHP Класс Acl\Auth\CrudAuthorize
CRUD mappings allow you to translate controller actions into *C*reate *R*ead *U*pdate *D*elete actions.
This is then checked in the AclComponent as specific permissions.
For example, taking
/posts/index as the current request. The default mapping for
index, is a
read permission
check. The Acl check would then be for the
posts controller with the
read permission. This allows you
to create permission systems that focus more on what is being done to resources, rather than the specific actions
being visited.
Показать файл
Открыть проект
Открытые методы
Метод |
Описание |
|
__construct ( Cake\Controller\ComponentRegistry $registry, array $config = [] ) |
Sets up additional actionMap values that match the configured Routing.prefixes. |
|
authorize ( array $user, Cake\Network\Request $request ) : boolean |
Authorize a user using the mapped actions and the AclComponent. |
|
Описание методов
__construct()
публичный метод
Sets up additional actionMap values that match the configured Routing.prefixes.
public __construct ( Cake\Controller\ComponentRegistry $registry, array $config = [] ) |
$registry |
Cake\Controller\ComponentRegistry |
The component registry from the controller. |
$config |
array |
An array of config. This class does not use any config. |
authorize()
публичный метод
Authorize a user using the mapped actions and the AclComponent.
public authorize ( array $user, Cake\Network\Request $request ) : boolean |
$user |
array |
The user to authorize |
$request |
Cake\Network\Request |
The request needing authorization. |
Результат |
boolean |
|