本文整理汇总了PHP中AuthorizationPolicy::AuthorizationPolicy方法的典型用法代码示例。如果您正苦于以下问题:PHP AuthorizationPolicy::AuthorizationPolicy方法的具体用法?PHP AuthorizationPolicy::AuthorizationPolicy怎么用?PHP AuthorizationPolicy::AuthorizationPolicy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AuthorizationPolicy
的用法示例。
在下文中一共展示了AuthorizationPolicy::AuthorizationPolicy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SubmissionRequiredPolicy
/**
* Constructor
* @param $request PKPRequest
* @param $args array request parameters
* @param $submissionParameterName string the request parameter we expect
* the submission id in.
* @param $message string
*/
function SubmissionRequiredPolicy(&$request, &$args, $submissionParameterName = 'submissionId', $message = null)
{
parent::AuthorizationPolicy($message);
$this->_request =& $request;
assert(is_array($args));
$this->_args =& $args;
$this->_submissionParameterName = $submissionParameterName;
}
示例2: HttpsPolicy
/**
* Constructor
*
* @param $request PKPRequest
*/
function HttpsPolicy(&$request)
{
parent::AuthorizationPolicy();
$this->_request =& $request;
// Add advice
$callOnDeny = array($request, 'redirectSSL', array());
$this->setAdvice(AUTHORIZATION_ADVICE_CALL_ON_DENY, $callOnDeny);
}
示例3: DataObjectRequiredPolicy
/**
* Constructor
* @param $request PKPRequest
* @param $args array request parameters
* @param $parameterName string the request parameter we expect
* @param $message string
* @param $operations array Optional list of operations for which this check takes effect. If specified, operations outside this set will not be checked against this policy.
*/
function DataObjectRequiredPolicy(&$request, &$args, $parameterName, $message = null, $operations = null)
{
parent::AuthorizationPolicy($message);
$this->_request =& $request;
assert(is_array($args));
$this->_args =& $args;
$this->_parameterName = $parameterName;
$this->_operations = $operations;
}
示例4: HandlerOperationPolicy
/**
* Constructor
* @param $request PKPRequest
* @param $operations array|string either a single operation or a list of operations that
* this policy is targeting.
* @param $message string a message to be displayed if the authorization fails
*/
function HandlerOperationPolicy(&$request, $operations, $message = null)
{
parent::AuthorizationPolicy($message);
$this->_request =& $request;
// Make sure a single operation doesn't have to
// be passed in as an array.
assert(is_string($operations) || is_array($operations));
if (!is_array($operations)) {
$operations = array($operations);
}
$this->_operations = $operations;
}
示例5: WorkflowSubmissionAssignmentPolicy
/**
* Constructor
* @param $request Request
* @param $stageId integer the stage the user has to be assigned to.
*/
function WorkflowSubmissionAssignmentPolicy(&$request, $stageId)
{
$this->_request =& $request;
$this->_stageId = (int) $stageId;
parent::AuthorizationPolicy('user.authorization.workflowStageAssignmentMissing');
}
示例6: WorkflowSettingsAssignmentPolicy
/**
* Constructor
* @param $request PKPRequest
*/
function WorkflowSettingsAssignmentPolicy(&$request)
{
parent::AuthorizationPolicy('user.authorization.workflowStageSettingMissing');
$this->_request =& $request;
}
示例7: UserRolesRequiredPolicy
/**
* Constructor
*
* @param $request PKPRequest
*/
function UserRolesRequiredPolicy($request)
{
parent::AuthorizationPolicy();
$this->_request = $request;
}
示例8: PluginLevelRequiredPolicy
/**
* Constructor
* @param $request PKPRequest
*/
function PluginLevelRequiredPolicy($request, $contextLevel)
{
parent::AuthorizationPolicy();
$this->_contextLevel =& $contextLevel;
}
示例9: PluginRequiredPolicy
/**
* Constructor
* @param $request PKPRequest
*/
function PluginRequiredPolicy($request)
{
parent::AuthorizationPolicy('user.authorization.pluginRequired');
$this->_request = $request;
}
示例10: SubmissionFileBaseAccessPolicy
/**
* Constructor
* @param $request PKPRequest
* @param $fileIdAndRevision string If passed, this policy will try to
* get the submission file from this data.
*/
function SubmissionFileBaseAccessPolicy($request, $fileIdAndRevision = null)
{
parent::AuthorizationPolicy('user.authorization.submissionFile');
$this->_request = $request;
$this->_fileIdAndRevision = $fileIdAndRevision;
}
示例11:
/**
* Constructor
* @param $request PKPRequest
*/
function PKPUserAccessibleWorkflowStageRequiredPolicy($request)
{
parent::AuthorizationPolicy();
$this->_request = $request;
}
示例12: UserRequiredPolicy
/**
* Constructor
*
* @param $request PKPRequest
*/
function UserRequiredPolicy($request, $message = 'user.authorization.userRequired')
{
parent::AuthorizationPolicy($message);
$this->_request = $request;
}
示例13: LoggedInWithValidUserGroupPolicy
/**
* Constructor
*
* @param $request PKPRequest
*/
function LoggedInWithValidUserGroupPolicy(&$request)
{
parent::AuthorizationPolicy('user.authorization.userGroupRequired');
$this->_request =& $request;
}
示例14: SubmissionAuthorPolicy
/**
* Constructor
* @param $request PKPRequest
*/
function SubmissionAuthorPolicy($request)
{
parent::AuthorizationPolicy('user.authorization.submissionAuthor');
$this->_request = $request;
}
示例15:
/**
* Constructor
* @param $request PKPRequest
*/
function UserAccessibleWorkflowStageRequiredPolicy($request)
{
parent::AuthorizationPolicy('user.authorization.accessibleWorkflowStage');
$this->_request = $request;
}