Skip to content

Commit

Permalink
Merge pull request #3726 from eszkadev/private/eszkadev/is-admin-alwa…
Browse files Browse the repository at this point in the history
…ys-present

Always pass is_admin property to userextrainfo
  • Loading branch information
juliushaertl committed Jun 5, 2024
2 parents 96b6811 + 9bed856 commit ef789fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Controller/WopiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,12 @@ public function checkFileInfo($fileId, $access_token) {
$response['UserExtraInfo']['avatar'] = $this->urlGenerator->linkToRouteAbsolute('core.avatar.getAvatar', ['userId' => $wopi->getEditorUid(), 'size' => self::WOPI_AVATAR_SIZE]);
if ($this->groupManager->isAdmin($wopi->getEditorUid())) {
$response['UserExtraInfo']['is_admin'] = true;
} else {
$response['UserExtraInfo']['is_admin'] = false;
}
} else {
$response['UserExtraInfo']['avatar'] = $this->urlGenerator->linkToRouteAbsolute('core.GuestAvatar.getAvatar', ['guestName' => urlencode($wopi->getGuestDisplayname()), 'size' => self::WOPI_AVATAR_SIZE]);
$response['UserExtraInfo']['is_admin'] = false;
}

if ($isPublic) {
Expand Down

0 comments on commit ef789fb

Please sign in to comment.