acl get level fix

This commit is contained in:
yuri
2018-10-18 13:49:07 +03:00
parent b84838bfbb
commit 8fc0ed81ff
2 changed files with 10 additions and 1 deletions

View File

@@ -182,6 +182,15 @@ class Table
return 'no';
}
public function getHighestLevel($action)
{
if (in_array($action, $this->booleanActionList)) {
return 'yes';
} else {
return 'all';
}
}
private function load()
{
$valuePermissionLists = (object)[];

View File

@@ -125,7 +125,7 @@ class AclManager
public function getLevel(User $user, $scope, $action)
{
if ($user->isAdmin()) {
return 'all';
return $this->getTable($user)->getHighestLevel($action);
}
return $this->getTable($user)->getLevel($scope, $action);
}