Skip to content

Commit

Permalink
Merge pull request #3733 from nextcloud/backport/3726/stable29
Browse files Browse the repository at this point in the history
[stable29] Always pass is_admin property to userextrainfo
  • Loading branch information
juliushaertl committed Jun 6, 2024
2 parents aeca3cc + 2838ebc commit 0ef7863
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 @@ -224,9 +224,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 0ef7863

Please sign in to comment.