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-04 16:41:31 +00:00
committed by backportbot[bot]
parent 74f0106718
commit 75110bed47
+4
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;