Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
UserRolesRequiredPolicy Class Reference
Inheritance diagram for UserRolesRequiredPolicy:
AuthorizationPolicy

Public Member Functions

 _getContextRoles ($roleContext, $contextDepth, $userRoles)
 
 _prepareContextRolesArray ($userRoles, $contextRoles=array())
 
 effect ()
 
 UserRolesRequiredPolicy (&$request)
 
- 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

Policy to build an authorized user roles object. Because we may have users with no roles, we don't deny access when no user roles are found.

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

Member Function Documentation

UserRolesRequiredPolicy::_getContextRoles (   $roleContext,
  $contextDepth,
  $userRoles 
)

Get the current context roles from all user roles.

Parameters
array$roleContext
int$contextDepth
array$userRoles
Returns
mixed array or null

Definition at line 75 of file UserRolesRequiredPolicy.inc.php.

References _prepareContextRolesArray(), and DAORegistry\getDAO().

Referenced by effect().

UserRolesRequiredPolicy::_prepareContextRolesArray (   $userRoles,
  $contextRoles = array() 
)

Prepare an array with the passed user roles. Can optionally add those roles to an already created array.

Parameters
$userRolesarray
$contextRolesarray
Returns
array

Definition at line 124 of file UserRolesRequiredPolicy.inc.php.

Referenced by _getContextRoles().

UserRolesRequiredPolicy::UserRolesRequiredPolicy ( $request)

Constructor

Parameters
$requestPKPRequest

Definition at line 27 of file UserRolesRequiredPolicy.inc.php.


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