Check if the authority doesn't have any of the given roles.

@param  string  $role
@return bool
344139
public function notA($role)
    {
        $roles = func_get_args();

        return $this->clipboard->checkRole($this->authority, $roles, 'not');
    }
641367
public function hasRole($role)
    {
        if (is_string($role)) {
            return $this->roles->contains('name', $role);
        }

        if (is_array($role)) {
            foreach ($role as $r) {
                if ($this->hasRole($r)) {
                    return true;
                }
            }

            return false;
        }

        return !!$role->intersect($this->roles)->count();
    }
548934
public function revokeRole(Role $role): bool
    {
        return (new actions\RevokeRole($this->user, $role))->execute();
    }
642464
public function hasRole($role)
    {
        if (!$this->roles->where('token', $role)->isEmpty()) {
            return true;
        }

        foreach ($this->groups as $group) {
            if (!$group->roles->where('token', $role)->isEmpty()) {
                return true;
            }
        }

        return false;
    }
241253
public function hasRole($role)
    {
        if ($this->instance instanceof \Phavour\Session\Storage) {
            $roles = $this->instance->get('roles');
            if (is_array($roles) && in_array($role, $roles)) {
                return true;
            }
        }

        return false;
    }
1309949
public function is($roles)
	{
		if (!$this->user())
		{
			return false;
		}

		$userRoles = $this->getUser()->roles;

		foreach ((array)$roles as $role)
		{
			if (in_array(mb_strtolower($role), $userRoles)
				|| in_array($role, $userRoles)
			)
			{
				return true;
			}
		}

		return false;
	}
469182
public function isAllowed($role, $resource, $privilege): bool
    {
        // collect current acl
        $this->listCurrentAcl[$role . $resource . $privilege] = [
            'role'      => $role,
            'resource'  => $resource,
            'privilege' => $privilege,
        ];

        // for policy none
        if ($this->policy == self::POLICY_NONE) {
            return true;
        }

        // auto-fix missing resource in acl
        if ($resource && !isset($this->resource[$resource])) {
            $this->saveResource(['id' => null, 'resource' => $resource]);
        }
        return $this->permission->isAllowed($role, $resource, $privilege);
    }
39061
public function addRole($role)
    {
        if ($role instanceof Role) {
            $role = $role->id;
        }

        // We don't want a double up on roles
        if (false !== array_search($role, (array) $this->attributes['roles'])) {
            return false;
        }

        $this->attributes['roles'][] = $role;

        return true;
    }
1063247
public function hasRole($role, $requireAll = false)
    {
        if ($user = $this->user()) {
            return $user->hasRole($role, $requireAll);
        }

        return false;
    }
982350
public function findNotInRole(RoleInterface $role)
    {
        $callback   =   function ($permission) use ($role) {
            return $role->hasnt($permission->key);
        };
        
        return array_filter($this->findAll(), $callback);
    }
57282
protected function hasRole($role) {
		if(!$this->container->has('security.authorization_checker')) {
			throw new \LogicException('The SecurityBundle is not registered in your application.');
		}
		return false !== $this->get('security.authorization_checker')->isGranted($role);
	}
1046405
public function equals($role) {
		return $role->getRole()->id == $this->role->id && $role->getRole()->name == $this->role->name;
	}
539441
public function isAllowed($role, $resource) {

		if(false === is_string($role)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($role)), E_USER_ERROR);
		}

		if(false === is_string($resource)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($resource)), E_USER_ERROR);
		}

		if(true === isset($this -> permissions[$role][$resource])) {
			return $this -> permissions[$role][$resource];
		}

		return false;
	}
237406
public function hasRoles($roles)
    {
        $roles = is_array($roles) ? $roles : func_get_args();

        foreach ($roles as $role) {
            if ($this->hasRole($role)) {
                return true;
            }
        }

        return false;
    }
1150665
public function hasRole($role)
    {
        if (is_string($role)) {
            return $this->roles->contains('slug', $role);
        }

        if (is_array($role)) {
            $roles = $this->getRoleSlugs();

            $intersection      = array_intersect($roles, (array) $role);
            $intersectionCount = count($intersection);

            return ($intersectionCount > 0) ? true : false;
        }

        return ! ! $role->intersect($this->roles)->count();
    }
932974
public function isNotAn($role)
    {
        $roles = func_get_args();

        $clipboard = $this->getClipboardInstance();

        return $clipboard->checkRole($this, $roles, 'not');
    }
459017
public function hasRole(...$roles)
    {
        $roles = array_flatten($roles);

        foreach ($roles as $role) {
            $name = $role instanceof Role ? $role->name : $role;

            if ($this->roles->contains('name', $name)) {
                return true;
            }
        }

        return false;
    }