Skip to content

Commit

Permalink
Make psalm happy
Browse files Browse the repository at this point in the history
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
  • Loading branch information
PVince81 and come-nc authored Jan 12, 2023
1 parent 141dfc9 commit 7412381
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/provisioning_api/lib/Controller/AUserData.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ protected function getUserData(string $userId, bool $includeScopes = false): arr
}

// Should be at least Admin Or SubAdmin!
if ($currentLoggedInUser === null) {
throw new OCSException('No user logged in');
}
$isAdmin = $this->groupManager->isAdmin($currentLoggedInUser->getUID());
if ($isAdmin
|| $this->groupManager->getSubAdmin()->isUserAccessible($currentLoggedInUser, $targetUserObject)) {
Expand Down

0 comments on commit 7412381

Please sign in to comment.