addRoleAssignment( [Role::ROLE_ID_MANAGER, Role::ROLE_ID_SITE_ADMIN], ['fetch', 'fetchRow', 'save'] ); } /** * Set the current context * * @param Context $context */ public function setContext($context) { $this->_context = $context; } /** * Get the current context * * @return Context */ public function getContext() { return $this->_context; } /** * @copydoc PKPHandler::authorize() */ public function authorize($request, &$args, $roleAssignments) { $this->addPolicy(new ContextAccessPolicy($request, $roleAssignments)); return parent::authorize($request, $args, $roleAssignments); } /** * @copydoc ListbuilderHandler::initialize() * * @param null|mixed $args */ public function initialize($request, $args = null) { $this->setContext($request->getContext()); return parent::initialize($request, $args); } }