Session handling bugfix, profile frontend WIP

This commit is contained in:
2024-04-06 11:52:22 +02:00
parent b68ff85578
commit fe81e0f6fa
14 changed files with 422 additions and 470 deletions

View File

@@ -76,6 +76,10 @@ namespace Core\API\Permission {
$currentUser = $this->context->getUser();
$userGroups = $currentUser ? $currentUser->getGroups() : [];
if (empty($userGroups) || empty(array_intersect($groups, array_keys($userGroups)))) {
if (!$currentUser) {
$this->result["loggedIn"] = false;
}
http_response_code(401);
return $this->createError("Permission denied.");
}