Check for null value to avoid TypeError in the group manager

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2021-08-03 09:47:27 +02:00
parent f2052702b5
commit cb9fc6c9a2

View File

@@ -308,6 +308,10 @@ class PermissionService {
}
public function canCreate() {
if ($this->userId === null) {
return false;
}
$groups = $this->getGroupLimitList();
if (count($groups) === 0) {
return true;