now really fixed (hopefully)
This commit is contained in:
parent
820b7f709f
commit
77ec99e845
@ -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, array_keys($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');
|
||||
|
@ -81,8 +81,8 @@ class CreateDatabase {
|
||||
->addInt("user_id")
|
||||
->addInt("group_id")
|
||||
->unique("user_id", "group_id")
|
||||
->foreignKey("user_id", "User", "uid")
|
||||
->foreignKey("group_id", "Group", "uid");
|
||||
->foreignKey("user_id", "User", "uid", new CascadeStrategy())
|
||||
->foreignKey("group_id", "Group", "uid", new CascadeStrategy());
|
||||
|
||||
$queries[] = $sql->createTable("Notification")
|
||||
->addSerial("uid")
|
||||
|
Loading…
Reference in New Issue
Block a user