PHP Class Acl\Model\Table\PermissionsTable

Inheritance: extends AclNodesTable
Show file Open project: cakephp/acl Class Usage Examples

Public Methods

Method Description
allow ( string $aro, string $aco, string $actions = '*', integer $value = 1 ) : boolean Allow $aro to have access to action $actions in $aco
check ( string $aro, string $aco, string $action = '*' ) : boolean Checks if the given $aro has access to action $action in $aco
getAclLink ( string $aro, string $aco ) : array Get an array of access-control links between the given Aro and Aco
getAcoKeys ( array $keys ) : array Get the crud type keys
initialize ( array $config ) : void {@inheritDoc}

Method Details

allow() public method

Allow $aro to have access to action $actions in $aco
public allow ( string $aro, string $aco, string $actions = '*', integer $value = 1 ) : boolean
$aro string ARO The requesting object identifier.
$aco string ACO The controlled object identifier.
$actions string Action (defaults to *) Invalid permissions will result in an exception
$value integer Value to indicate access type (1 to give access, -1 to deny, 0 to inherit)
return boolean Success

check() public method

Checks if the given $aro has access to action $action in $aco
public check ( string $aro, string $aco, string $action = '*' ) : boolean
$aro string ARO The requesting object identifier.
$aco string ACO The controlled object identifier.
$action string Action (defaults to *)
return boolean Success (true if ARO has access to action in ACO, false otherwise)

getAcoKeys() public method

Get the crud type keys
public getAcoKeys ( array $keys ) : array
$keys array Permission schema
return array permission keys

initialize() public method

{@inheritDoc}
public initialize ( array $config ) : void
$config array Configuration
return void