]> source.dussan.org Git - nextcloud-server.git/commitdiff
Ask for password when scope is changed
authorLukas Reschke <lukas@statuscode.ch>
Fri, 18 Nov 2016 19:03:02 +0000 (20:03 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Mon, 21 Nov 2016 10:30:02 +0000 (11:30 +0100)
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
settings/js/federationsettingsview.js

index 9b38664d2f8a9ce9ff23d975fee162950bc3759a..7a629fc2ab6a9c72f8c010a491fdaef160342fc1 100644 (file)
                },
 
                _onScopeChanged: function(field, scope) {
+                       var $dialog = $('.oc-dialog:visible');
+                       if (OC.PasswordConfirmation.requiresPasswordConfirmation()) {
+                               if($dialog.length === 0) {
+                                       OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this._onScopeChanged, this, field, scope));
+                               }
+                               return;
+                       }
+
                        this._config.set(field + 'Scope', scope);
 
                        $('#' + field).parent().find('span > input').val(scope);