|
Open Journal Systems
3.3.0
|
Public Member Functions | |
| __construct ($request, $roles, $operations, $message='user.authorization.roleBasedAccessDenied', $allRoles=false) | |
| _checkUserRoleAssignment ($userRoles) | |
| effect () | |
Public Member Functions inherited from HandlerOperationPolicy | |
| __construct ($request, $operations, $message=null) | |
| _checkOperationWhitelist () | |
| getOperations () | |
| & | getRequest () |
Public Member Functions inherited from AuthorizationPolicy | |
| __construct ($message=null) | |
| addAuthorizedContextObject ($assocType, &$authorizedObject) | |
| applies () | |
| & | getAdvice ($adviceType) |
| & | getAuthorizedContext () |
| & | getAuthorizedContextObject ($assocType) |
| hasAdvice ($adviceType) | |
| hasAuthorizedContextObject ($assocType) | |
| setAdvice ($adviceType, &$adviceContent) | |
| setAuthorizedContext (&$authorizedContext) | |
Data Fields | |
| $_allRoles | |
| $_roles = array() | |
Data Fields inherited from HandlerOperationPolicy | |
| $_operations = array() | |
| $_request | |
Data Fields inherited from AuthorizationPolicy | |
| $_advice = array() | |
| $_authorizedContext = array() | |
Class to control access to handler operations via role based access control.
Definition at line 18 of file RoleBasedHandlerOperationPolicy.inc.php.
| RoleBasedHandlerOperationPolicy::__construct | ( | $request, | |
| $roles, | |||
| $operations, | |||
$message = 'user.authorization.roleBasedAccessDenied', |
|||
$allRoles = false |
|||
| ) |
Constructor
| $request | PKPRequest |
| $roles | array|integer either a single role ID or an array of role ids |
| $operations | array|string either a single operation or a list of operations that this policy is targeting. |
| $message | string a message to be displayed if the authorization fails |
| $allRoles | boolean whether all roles must match ("all of") or whether it is enough for only one role to match ("any of"). Default: false ("any of") |
Definition at line 41 of file RoleBasedHandlerOperationPolicy.inc.php.
| RoleBasedHandlerOperationPolicy::_checkUserRoleAssignment | ( | $userRoles | ) |
Check whether the given user has been assigned to any of the allowed roles. If so then grant access.
| $userRoles | array |
Definition at line 90 of file RoleBasedHandlerOperationPolicy.inc.php.
Referenced by AssignedStageRoleHandlerOperationPolicy\effect(), and effect().
| RoleBasedHandlerOperationPolicy::effect | ( | ) |
Reimplemented from AuthorizationPolicy.
Reimplemented in AssignedStageRoleHandlerOperationPolicy.
Definition at line 63 of file RoleBasedHandlerOperationPolicy.inc.php.
References HandlerOperationPolicy\_checkOperationWhitelist(), _checkUserRoleAssignment(), AuthorizationPolicy\getAuthorizedContextObject(), and HandlerOperationPolicy\getRequest().
| boolean RoleBasedHandlerOperationPolicy::$_allRoles |
Definition at line 29 of file RoleBasedHandlerOperationPolicy.inc.php.
| array RoleBasedHandlerOperationPolicy::$_roles = array() |
the target roles
Definition at line 23 of file RoleBasedHandlerOperationPolicy.inc.php.