diff options
author | Robin Appelman <robin@icewind.nl> | 2020-12-11 16:40:29 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-01-08 15:06:42 +0100 |
commit | 518e91b0087058f2c9813da6a2427a56fc14e32c (patch) | |
tree | bd29f6831488b6393406efaa60886e2215f036bb /apps/files_external/js | |
parent | 81302f78e5cea60dc9064be8ed979d523ff84e18 (diff) | |
download | nextcloud-server-518e91b0087058f2c9813da6a2427a56fc14e32c.tar.gz nextcloud-server-518e91b0087058f2c9813da6a2427a56fc14e32c.zip |
dont offer to edit external config settings if we can't edit them
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external/js')
-rw-r--r-- | apps/files_external/js/statusmanager.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files_external/js/statusmanager.js b/apps/files_external/js/statusmanager.js index e8273dca0df..c3945991810 100644 --- a/apps/files_external/js/statusmanager.js +++ b/apps/files_external/js/statusmanager.js @@ -94,7 +94,8 @@ OCA.Files_External.StatusManager = { id: mountData.id, error: statusMessage, userProvided: response.userProvided, - authMechanism: response.authMechanism + authMechanism: response.authMechanism, + canEdit: response.can_edit, }; } afterCallback(mountData, self.mountStatus[mountData.mount_point]); @@ -182,12 +183,14 @@ OCA.Files_External.StatusManager = { if (mountData.userProvided || mountData.authMechanism === 'password::global::user') { // personal mount whit credentials problems this.showCredentialsDialog(name, mountData); - } else { + } else if (mountData.canEdit) { OC.dialogs.confirm(t('files_external', 'There was an error with message: ') + mountData.error + '. Do you want to review mount point config in admin settings page?', t('files_external', 'External mount error'), function (e) { if (e === true) { OC.redirect(OC.generateUrl('/settings/admin/externalstorages')); } }); + } else { + OC.dialogs.info(t('files_external', 'There was an error with message: ') + mountData.error + '. Please contact your system administrator.', t('files_external', 'External mount error'), () => {}); } } else { OC.dialogs.confirm(t('files_external', 'There was an error with message: ') + mountData.error + '. Do you want to review mount point config in personal settings page?', t('files_external', 'External mount error'), function (e) { |