Open Journal Systems  2.4.3
 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)
 

Detailed Description

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

Definition at line 18 of file RoleBasedHandlerOperationPolicy.inc.php.

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.

Parameters
$userRolesarray
Returns
boolean

Definition at line 96 of file RoleBasedHandlerOperationPolicy.inc.php.

Referenced by effect().

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

Constructor

Parameters
$requestPKPRequest
$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 41 of file RoleBasedHandlerOperationPolicy.inc.php.


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