Esempio n. 1
0
 public function isAllow(GrantableInterface $grantable, $action)
 {
     if ($grantable instanceof UserRestrictionCapabilitiesInterface) {
         if ($grantable->isSuperAdmin()) {
             return true;
         }
     }
     return parent::isAllow($grantable, $action);
 }
Esempio n. 2
0
 /**
  * @param GrantableInterface $grantable
  */
 public function initialize(GrantableInterface $grantable)
 {
     $this->resolver->setRoles($grantable->roles);
     parent::initialize($grantable);
 }
Esempio n. 3
0
 /**
  * @param PermissionResolver $resolver
  * @param RoleRepository     $repository
  */
 public function __construct(PermissionResolver $resolver, RoleRepository $repository)
 {
     $this->repository = $repository;
     parent::__construct($resolver);
 }