public function isAllowed($role, $resource, $access, array $parameters = null)
{
if ($this->redis->sIsMember("accessList:{$role}:{$resource}:" . Acl::ALLOW, $access)) {
return Acl::ALLOW;
}
if ($this->redis->exists("rolesInherits:{$role}")) {
$rolesInherits = $this->redis->sMembers("rolesInherits:{$role}");
foreach ($rolesInherits as $role) {
if ($this->redis->sIsMember("accessList:{$role}:{$resource}:" . Acl::ALLOW, $access)) {
return Acl::ALLOW;
}
}
}
/**
* Return the default access action
*/
return $this->getDefaultAction();
}