Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2022-05-23 23:39:15 +0300
committerHenry Castro <hcastro@collabora.com>2022-05-23 23:59:47 +0300
commit41a789842301c8cd6278cd502c7553c3e7e141bd (patch)
tree1980a5c8543735000db7248f729b112763dcd567
parent6eada6fa4c8d5a0a8e39913fca2add48c5a507f9 (diff)
add "is_guest" to extra info user data
In order to avoid show welcome dialog to the guest user. Signed-off-by: Henry Castro <hcastro@collabora.com>
-rw-r--r--lib/Controller/WopiController.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Controller/WopiController.php b/lib/Controller/WopiController.php
index b06a9d1d..d3f2215a 100644
--- a/lib/Controller/WopiController.php
+++ b/lib/Controller/WopiController.php
@@ -265,6 +265,10 @@ class WopiController extends Controller {
$response['UserExtraInfo']['avatar'] = $this->urlGenerator->linkToRouteAbsolute('core.GuestAvatar.getAvatar', ['guestName' => urlencode($wopi->getGuestDisplayname()), 'size' => self::WOPI_AVATAR_SIZE]);
}
+ if ($isPublic) {
+ $response['UserExtraInfo']['is_guest'] = true;
+ }
+
if ($wopi->isRemoteToken()) {
$response = $this->setFederationFileInfo($wopi, $response);
}