Exemplo n.º 1
0
 protected function isAllowedForGuest($aclResource, $action, $namespace = '')
 {
     if (!$aclResource || !$this->service->acl()->hasResource($namespace . $aclResource)) {
         return false;
     }
     return $this->service->acl()->isAllowed(Roles::GUEST, $namespace . $aclResource, $action);
 }
Exemplo n.º 2
0
 public function __construct(AclServiceInterface $acl, array $roles = [])
 {
     $this->addRoles($roles);
     $this->acl = $acl->acl();
 }