diff options
author | Hubert Figuière <hub@collabora.com> | 2024-04-03 16:54:55 -0400 |
---|---|---|
committer | Caolán McNamara <caolanm@gmail.com> | 2024-04-16 16:44:50 +0100 |
commit | 6a8e00c1afef1ead2d3eacc0bd76849268b8d00a (patch) | |
tree | 71d736968206167f0048a5f7226be61c92ca19b7 /browser/src/control/Permission.js | |
parent | bgsave: initial unit testing skeleton. (diff) | |
download | online-6a8e00c1afef1ead2d3eacc0bd76849268b8d00a.tar.gz online-6a8e00c1afef1ead2d3eacc0bd76849268b8d00a.zip |
permission: Don't show the edit button if read-only
If wopi.UserCanWrite tells us we can't write the file no reason to show the edit button
that would do nothing anyway.
Fix https://github.com/CollaboraOnline/online/issues/8686
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I4f6d1f8d8be520e422e260f2e532cb86541e8d0f
Diffstat (limited to 'browser/src/control/Permission.js')
-rw-r--r-- | browser/src/control/Permission.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/browser/src/control/Permission.js b/browser/src/control/Permission.js index 290bb70e90..9c8c469327 100644 --- a/browser/src/control/Permission.js +++ b/browser/src/control/Permission.js @@ -68,7 +68,7 @@ L.Map.include({ button.on('click', function () { that._requestFileCopy(); }); - } else if (!this.options.canTryLock && (window.mode.isMobile() || window.mode.isTablet())) { + } else if ((!window.ThisIsAMobileApp && !this['wopi'].UserCanWrite) || (!this.options.canTryLock && (window.mode.isMobile() || window.mode.isTablet()))) { $('#mobile-edit-button').hide(); } |