Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
RoleBasedHandlerOperationPolicy Class Reference
Inheritance diagram for RoleBasedHandlerOperationPolicy:
HandlerOperationPolicy AuthorizationPolicy

Public Member Functions

 _checkUserRoleAssignment ($userRoles)
 effect ()
 RoleBasedHandlerOperationPolicy ($request, $roles, $operations, $message= 'user.authorization.roleBasedAccessDenied', $allRoles=false, $bypassOperationCheck=false)
- Public Member Functions inherited from HandlerOperationPolicy
 _checkOperationWhitelist ()
 getOperations ()
getRequest ()
 HandlerOperationPolicy ($request, $operations, $message=null)
- Public Member Functions inherited from AuthorizationPolicy
 addAuthorizedContextObject ($assocType, &$authorizedObject)
 applies ()
 AuthorizationPolicy ($message=null)
 effect ()
getAdvice ($adviceType)
getAuthorizedContext ()
getAuthorizedContextObject ($assocType)
 hasAdvice ($adviceType)
 hasAuthorizedContextObject ($assocType)
 setAdvice ($adviceType, &$adviceContent)
 setAuthorizedContext (&$authorizedContext)

Public Attributes

 $_roles = array()
- Public Attributes inherited from HandlerOperationPolicy
 $_operations = array()
- Public Attributes inherited from AuthorizationPolicy
 $_advice = array()
 $_authorizedContext = array()

Detailed Description

Class to control access to handler operations via role based access control.

Definition at line 18 of file

Member Function Documentation

RoleBasedHandlerOperationPolicy::_checkUserRoleAssignment (   $userRoles)

Check whether the given user has been assigned to any of the allowed roles. If so then grant access.


Definition at line 105 of file

RoleBasedHandlerOperationPolicy::effect ( )
RoleBasedHandlerOperationPolicy::RoleBasedHandlerOperationPolicy (   $request,
  $message = 'user.authorization.roleBasedAccessDenied',
  $allRoles = false,
  $bypassOperationCheck = false 


$rolesarray|integer either a single role ID or an array of role ids
$operationsarray|string either a single operation or a list of operations that this policy is targeting.
$messagestring a message to be displayed if the authorization fails
$allRolesboolean whether all roles must match ("all of") or whether it is enough for only one role to match ("any of").
$bypassOperationCheckboolean only for backwards compatibility, don't use. FIXME: remove this parameter once we've removed the HandlerValidatorRole compatibility class, see #5868.

Definition at line 50 of file

Member Data Documentation

array RoleBasedHandlerOperationPolicy::$_roles = array()

the target roles

Definition at line 23 of file

The documentation for this class was generated from the following file: