ACL fix (oops)

This commit is contained in:
Roman Hergenreder 2020-06-23 16:29:54 +02:00
parent cb9fbe1f08
commit 5d36cbd541

@ -129,7 +129,7 @@ class Request {
$this->lastError = 'You are not logged in.';
header('HTTP 1.1 401 Unauthorized');
return false;
} else if(!empty($this->requiredGroup) && !empty(array_intersect($this->requiredGroup, $this->user->getGroups()))) {
} else if(!empty($this->requiredGroup) && empty(array_intersect($this->requiredGroup, $this->user->getGroups()))) {
$this->lastError = "Insufficient permissions. Required group: "
. implode(", ", array_map(function ($group) { return GroupName($group); }, $this->requiredGroup));
header('HTTP 1.1 401 Unauthorized');