Caffeinated\Shinobi\Models\Role::canAtLeast PHP Method

canAtLeast() public method

Check if the role has at least one of the given permissions.
public canAtLeast ( array $permission = [] ) : boolean
$permission array
return boolean
    public function canAtLeast(array $permission = [])
    {
        if ($this->special === 'no-access') {
            return false;
        }
        if ($this->special === 'all-access') {
            return true;
        }
        $permissions = $this->getPermissions();
        $intersection = array_intersect($permissions, $permission);
        $intersectionCount = count($intersection);
        return $intersectionCount > 0 ? true : false;
    }