Свойство | Тип | Описание | |
---|---|---|---|
$_autoConfig | array | ||
$_roles | mixed | null if unset array otherwise with fetched AuthObjects |
Метод | Описание | |
---|---|---|
check ( mixed $requester, mixed $params, array $options = [] ) : Array | The Rbac adapter will iterate through the rbac data Array. | |
parseMatch ( mixed $match, mixed $params ) : boolean | parseMatch Matches the current request parameters against a set of given parameters. |
Метод | Описание | |
---|---|---|
_accessable ( $resources, $roles, array $options = [] ) : void | _hasRole Compares the results from _getRolesByAuth with the array passed to it. | |
_getRolesByAuth ( mixed $params, array $options = [] ) : array | mixed | ||
_hasRole ( $requesters, $params, array $options = [] ) | ||
_isAccessible ( array &$role, $params, array $options ) : boolean | Checks if the Role grants access If allow === false => no access If requesters has no role => no access If allows contains closures => return closures return Otherwise => grants access | |
_parseClosures ( array &$data, object $request, array &$roleOptions = [] ) : boolean | _parseClosures Iterates over an array and runs any anonymous functions it finds. Returns true if all of the closures it runs evaluate to true. $match is passed by refference and any closures found are removed from it before the method is complete. | |
_run ( array &$data, mixed $request = null, array &$options = [] ) : void | Itterates over an array and runs any anonymous functions it finds. Returns true if all of the closures it runs evaluate to true. $match is passed by reference and any closures found are removed from it before the method is complete. |
protected _accessable ( $resources, $roles, array $options = [] ) : void | ||
$options | array | |
Результат | void |
public check ( mixed $requester, mixed $params, array $options = [] ) : Array | ||
$requester | mixed | The user data array that holds all necessary information about the user requesting access. Or false (because Auth::check() can return false). This is an optional parameter, because we will fetch the users data through Auth seperately. |
$params | mixed | The Lithium `Request` object, or an array with at least 'request', and 'params' |
$options | array | An array of additional options for the _getRolesByAuth method. |
Результат | Array | An empty array if access is allowed or an array with reasons for denial if denied. |
protected mixed $_roles | ||
Результат | mixed |