Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
AuthorizationPolicy Class Reference
Inheritance diagram for AuthorizationPolicy:
ContextRequiredPolicy CopyeditorSubmissionAssignmentPolicy DataObjectRequiredPolicy HandlerOperationPolicy HttpsPolicy RestrictedSiteAccessPolicy SectionSubmissionAssignmentPolicy UserRequiredPolicy UserRolesRequiredPolicy

Public Member Functions

 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 represent an authorization policy.

We use some of the terminology specified in the draft XACML V3.0 standard, please see http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xacml for details.

We try to stick closely enough to XACML concepts to make sure that future improvements to the authorization framework can be done in a consistent manner.

This of course doesn't mean that we are "XACML compliant" in any way.

Definition at line 31 of file AuthorizationPolicy.inc.php.

Member Function Documentation

AuthorizationPolicy::addAuthorizedContextObject (   $assocType,
$authorizedObject 
)

Add an object to the authorized context

Parameters
$assocTypeinteger
$authorizedObjectmixed

Definition at line 91 of file AuthorizationPolicy.inc.php.

Referenced by CopyeditorSubmissionRequiredPolicy\effect(), SectionEditorSubmissionRequiredPolicy\effect(), and UserRolesRequiredPolicy\effect().

AuthorizationPolicy::applies ( )

Whether this policy applies.

Returns
boolean

Definition at line 143 of file AuthorizationPolicy.inc.php.

AuthorizationPolicy::AuthorizationPolicy (   $message = null)

Constructor

Parameters
$messagestring

Definition at line 46 of file AuthorizationPolicy.inc.php.

References setAdvice().

AuthorizationPolicy::effect ( )

This method must return a value of either AUTHORIZATION_DENY or AUTHORIZATION_PERMIT.

Definition at line 152 of file AuthorizationPolicy.inc.php.

& AuthorizationPolicy::getAdvice (   $adviceType)

Get advice for the given advice type.

Parameters
$adviceTypeinteger
Returns
mixed

Definition at line 77 of file AuthorizationPolicy.inc.php.

References hasAdvice().

& AuthorizationPolicy::getAuthorizedContext ( )

Get the authorized context

Returns
array

Definition at line 132 of file AuthorizationPolicy.inc.php.

& AuthorizationPolicy::getAuthorizedContextObject (   $assocType)

Retrieve an object from the authorized context

Parameters
$assocTypeinteger
Returns
mixed will return null if the context for the given assoc type does not exist.

Definition at line 111 of file AuthorizationPolicy.inc.php.

References hasAuthorizedContextObject().

Referenced by CopyeditorSubmissionAssignmentPolicy\effect(), SectionSubmissionAssignmentPolicy\effect(), and RoleBasedHandlerOperationPolicy\effect().

AuthorizationPolicy::hasAdvice (   $adviceType)

Whether this policy implements the given advice type.

Parameters
$adviceTypeinteger
Returns
boolean

Definition at line 68 of file AuthorizationPolicy.inc.php.

Referenced by getAdvice().

AuthorizationPolicy::hasAuthorizedContextObject (   $assocType)

Check whether an object already exists in the authorized context.

Parameters
$assocTypeinteger
Returns
boolean

Definition at line 101 of file AuthorizationPolicy.inc.php.

Referenced by getAuthorizedContextObject().

AuthorizationPolicy::setAdvice (   $adviceType,
$adviceContent 
)

Set an advice

Parameters
$adviceTypeinteger
$adviceContentmixed

Definition at line 58 of file AuthorizationPolicy.inc.php.

Referenced by AuthorizationPolicy(), and HttpsPolicy\HttpsPolicy().

AuthorizationPolicy::setAuthorizedContext ( $authorizedContext)

Set the authorized context

Returns
array

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


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