Skip to content

Commit b3bf200

Browse files
authored
check if user permissions are empty (#312)
1 parent 099c8c2 commit b3bf200

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Service/Permission/PermissionService.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ private function getPermissionsFromWorkspaces(
176176
return $this->workspaceService->getDeepestWorkspace($userWorkspaces)->getPermissions();
177177
}
178178

179+
if (empty($userWorkspaces)) {
180+
return $this->workspaceService->getDeepestWorkspace($roleWorkspaces)->getPermissions();
181+
}
182+
179183
$userWorkspace = $this->workspaceService->getDeepestWorkspace($userWorkspaces);
180184
$roleWorkspace = $this->workspaceService->getDeepestWorkspace($roleWorkspaces);
181185

0 commit comments

Comments
 (0)