private function setup(\Nethgui\Module\ModuleInterface $module)
 {
     $access = $this->pdp->authorize($this->user, get_class($module), \Nethgui\Module\ModuleInterface::ACTION_INSTANTIATE);
     if ($access->isDenied()) {
         throw $access->asException(1327492764);
     }
     if ($module instanceof Nethgui\Authorization\PolicyEnforcementPointInterface) {
         $module->setPolicyDecisionPoint($this->pdp);
     }
 }
Пример #2
0
 public function accept()
 {
     return $this->pdp->authorize($this->subject, $this->current(), \Nethgui\Controller\RequestHandlerInterface::ACTION_QUERY)->isAllowed();
 }