diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-07-08 15:14:25 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2020-07-08 15:14:25 +0300 |
commit | 570cecba1dfe4bcfd8b4fa52d9f465f4fc4f45a4 (patch) | |
tree | 2c1c4a2e02d2455f53a47f19bf26b694cc8947f1 /src | |
parent | c442fecbe9725e3654974488c90d5d756411d560 (diff) |
Hide sharing menu if no share permission is set
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/document.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/document.js b/src/document.js index d7863a4a..6ef30fb9 100644 --- a/src/document.js +++ b/src/document.js @@ -262,6 +262,10 @@ const documentsMain = { PostMessages.sendWOPIPostMessage('loolframe', 'Hide_Button', { id: 'fullscreen' }) PostMessages.sendWOPIPostMessage('loolframe', 'Hide_Menu_Item', { id: 'fullscreen' }) } + if (!(Config.get('permissions') & OC.PERMISSION_SHARE)) { + PostMessages.sendWOPIPostMessage('loolframe', 'Hide_Menu_Item', { id: 'shareas' }) + } + break case 'Failed': // Loading failed but editor shows the error |