Skip to content

Commit

Permalink
#1 Add missing authorization functions
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Sep 25, 2018
1 parent 7c8d461 commit 3e04718
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions SwordSettingsTabHandler.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ public function __construct() {
);
}

/**
* @copydoc PKPHandler::authorize()
*/
function authorize($request, &$args, $roleAssignments) {
import('lib.pkp.classes.security.authorization.ContextAccessPolicy');
$this->addPolicy(new ContextAccessPolicy($request, $roleAssignments));
return parent::authorize($request, $args, $roleAssignments);
}

/**
* SWORD plugin settings page
* @param $args array
Expand Down
9 changes: 9 additions & 0 deletions controllers/grid/SwordDepositPointsGridHandler.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ public function __construct() {
);
}

/**
* @copydoc PKPHandler::authorize()
*/
function authorize($request, &$args, $roleAssignments) {
import('lib.pkp.classes.security.authorization.ContextAccessPolicy');
$this->addPolicy(new ContextAccessPolicy($request, $roleAssignments));
return parent::authorize($request, $args, $roleAssignments);
}

/**
* @copydoc Gridhandler::initialize()
*/
Expand Down

0 comments on commit 3e04718

Please sign in to comment.