Make sure only groups can create if set

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2018-12-07 08:27:29 +01:00
parent 96dffbfedd
commit b8d00c8228

View File

@@ -248,13 +248,16 @@ class PermissionService {
public function canCreate() {
$groups = $this->getGroupLimitList();
if (count($groups) === 0) {
return true;
}
foreach ($groups as $group) {
if ($this->groupManager->isInGroup($this->userId, $group)) {
return false;
}
}
return true;
}
}
return false;
}
private function getGroupLimitList() {
$value = $this->config->getAppValue('deck', 'groupLimit', '');