diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-06-20 10:47:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-20 10:47:50 -0500 |
commit | b556c4855cdaf7a939b29c1c5b78f0b0dc8bb6a8 (patch) | |
tree | afe065082274bfb95ffb08e70365b3bd2d593895 | |
parent | 2660a3b49c55252782167eb3f1b5d484256a9c2f (diff) | |
parent | e30ed1de84ec93b25b0da1e33f12116a845d7381 (diff) | |
download | nextcloud-server-b556c4855cdaf7a939b29c1c5b78f0b0dc8bb6a8.tar.gz nextcloud-server-b556c4855cdaf7a939b29c1c5b78f0b0dc8bb6a8.zip |
Merge pull request #5479 from nextcloud/pr-5459-follow-up
Also allow group admins to toogle the storage location
-rw-r--r-- | settings/js/users/users.js | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js index df574bbc949..e608efb491a 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -1062,17 +1062,15 @@ $(document).ready(function () { // Option to display/hide the "Storage location" column $('#CheckboxStorageLocation').click(function() { if ($('#CheckboxStorageLocation').is(':checked')) { - OCP.AppConfig.setValue('core', 'umgmt_show_storage_location', 'true', { - success: function () { - $("#userlist .storageLocation").show(); - } - }); + $("#userlist .storageLocation").show(); + if (OC.isUserAdmin()) { + OCP.AppConfig.setValue('core', 'umgmt_show_storage_location', 'true'); + } } else { - OCP.AppConfig.setValue('core', 'umgmt_show_storage_location', 'false', { - success: function () { - $("#userlist .storageLocation").hide(); - } - }); + $("#userlist .storageLocation").hide(); + if (OC.isUserAdmin()) { + OCP.AppConfig.setValue('core', 'umgmt_show_storage_location', 'false'); + } } }); |