Open Journal Systems  3.3.0
HandlerOperationPolicy Class Reference
Inheritance diagram for HandlerOperationPolicy:
AuthorizationPolicy PKPPublicAccessPolicy RoleBasedHandlerOperationPolicy AssignedStageRoleHandlerOperationPolicy

Public Member Functions

 __construct ($request, $operations, $message=null)
 
 _checkOperationWhitelist ()
 
 getOperations ()
 
getRequest ()
 
- Public Member Functions inherited from AuthorizationPolicy
 __construct ($message=null)
 
 addAuthorizedContextObject ($assocType, &$authorizedObject)
 
 applies ()
 
 effect ()
 
getAdvice ($adviceType)
 
getAuthorizedContext ()
 
getAuthorizedContextObject ($assocType)
 
 hasAdvice ($adviceType)
 
 hasAuthorizedContextObject ($assocType)
 
 setAdvice ($adviceType, &$adviceContent)
 
 setAuthorizedContext (&$authorizedContext)
 

Data Fields

 $_operations = array()
 
 $_request
 
- Data Fields inherited from AuthorizationPolicy
 $_advice = array()
 
 $_authorizedContext = array()
 

Detailed Description

Abstract base class that provides infrastructure to control access to handler operations.

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

Constructor & Destructor Documentation

◆ __construct()

HandlerOperationPolicy::__construct (   $request,
  $operations,
  $message = null 
)

Constructor

Parameters
$requestPKPRequest
$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

Reimplemented in PKPPublicAccessPolicy.

Definition at line 38 of file HandlerOperationPolicy.inc.php.

Member Function Documentation

◆ _checkOperationWhitelist()

HandlerOperationPolicy::_checkOperationWhitelist ( )

Check whether the requested operation is on the list of permitted operations.

Returns
boolean

Definition at line 80 of file HandlerOperationPolicy.inc.php.

Referenced by PKPPublicAccessPolicy\effect(), AssignedStageRoleHandlerOperationPolicy\effect(), and RoleBasedHandlerOperationPolicy\effect().

◆ getOperations()

HandlerOperationPolicy::getOperations ( )

Return the operations whitelist.

Returns
array

Definition at line 67 of file HandlerOperationPolicy.inc.php.

References $_operations.

◆ getRequest()

& HandlerOperationPolicy::getRequest ( )

Return the request.

Returns
PKPRequest

Definition at line 59 of file HandlerOperationPolicy.inc.php.

References $_request.

Referenced by RoleBasedHandlerOperationPolicy\effect().

Field Documentation

◆ $_operations

array HandlerOperationPolicy::$_operations = array()

the target operations

Definition at line 29 of file HandlerOperationPolicy.inc.php.

Referenced by getOperations().

◆ $_request

PKPRequest HandlerOperationPolicy::$_request

Definition at line 23 of file HandlerOperationPolicy.inc.php.

Referenced by getRequest().


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