diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-02-18 16:36:02 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-02-26 15:02:41 +0100 |
commit | 932c4ee927f278f4ef5275a9582bca8822310738 (patch) | |
tree | 1580e808b6bad3e51a342242359a9398d46e4b48 /apps/files_external/js | |
parent | 2f0db9af07013655393ba199a1890fbf0e55ba0f (diff) | |
download | nextcloud-server-932c4ee927f278f4ef5275a9582bca8822310738.tar.gz nextcloud-server-932c4ee927f278f4ef5275a9582bca8822310738.zip |
Allow admins to disable certain external storages for users
Fix issue #6793
Diffstat (limited to 'apps/files_external/js')
-rw-r--r-- | apps/files_external/js/settings.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 895f97bd2c3..dbc9f548292 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -302,13 +302,23 @@ $(document).ready(function() { }); $('#allowUserMounting').bind('change', function() { + OC.msg.startSaving('#userMountingMsg'); if (this.checked) { OC.AppConfig.setValue('files_external', 'allow_user_mounting', 'yes'); + $('#userMountingBackups').removeClass('hidden'); } else { OC.AppConfig.setValue('files_external', 'allow_user_mounting', 'no'); + $('#userMountingBackups').addClass('hidden'); } + OC.msg.finishedSaving('#userMountingMsg', {status: 'success', data: {message: t('settings', 'Saved')}}); }); + $('input[name="allowUserMountingBackends\\[\\]"]').bind('change', function() { + OC.msg.startSaving('#userMountingMsg'); + var user_mounting_backends = $('input[name="allowUserMountingBackends\\[\\]"]:checked').map(function(){return $(this).val();}).get(); + OC.AppConfig.setValue('files_external', 'user_mounting_backends', user_mounting_backends.join()); + OC.msg.finishedSaving('#userMountingMsg', {status: 'success', data: {message: t('settings', 'Saved')}}); + }); }); })(); |