Check current user access in Custom ACL group.
App::Module('Acl')
->setGroupName(Group Name)
->hasAccess(Field Name, Expected Value)
Parameter |
Type |
Description |
---|---|---|
Group Name |
Mandatory |
Name of ACL group |
Field Name |
Mendatory |
Field Name to check |
Expected Value |
Mandatory |
Expected Value to check |
On success it return . For super admin it always return true.
See below example:
$result = App::Module('Acl')
->setGroupName('appstore')
->hasAccess('orderaccess','view');