]> source.dussan.org Git - nextcloud-server.git/commitdiff
Also allow group admins to toogle the storage location 5480/head
authorJoas Schilling <coding@schilljs.com>
Tue, 20 Jun 2017 08:35:22 +0000 (10:35 +0200)
committerJoas Schilling <coding@schilljs.com>
Tue, 20 Jun 2017 08:54:05 +0000 (10:54 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
settings/js/users/users.js

index df574bbc949016d96462a3f9e19fef9ea3352718..e608efb491a5b7b29fbaf06a57eaa4a788a4c4ee 100644 (file)
@@ -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');
+                       }
                }
        });