Skip to content

Commit

Permalink
Merge pull request #3748 from eszkadev/private/eszkadev/is-admin-prop…
Browse files Browse the repository at this point in the history
…erty
  • Loading branch information
juliushaertl committed Jun 12, 2024
2 parents 974b8c0 + 9d4bce1 commit 874a88a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/Controller/WopiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,16 @@ public function checkFileInfo($fileId, $access_token) {
if ($user !== null) {
$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;
$response['UserExtraInfo']['is_admin'] = true; // DEPRECATED
$response['IsAdminUser'] = true;
} else {
$response['UserExtraInfo']['is_admin'] = false;
$response['UserExtraInfo']['is_admin'] = false; // DEPRECATED
$response['IsAdminUser'] = 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;
$response['UserExtraInfo']['is_admin'] = false; // DEPRECATED
$response['IsAdminUser'] = false;
}

if ($isPublic) {
Expand Down

0 comments on commit 874a88a

Please sign in to comment.