From 16181c54639212e82c3841ac69cfcce5a44af2ab Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Fri, 18 Nov 2016 20:03:02 +0100 Subject: [PATCH] Ask for password when scope is changed Signed-off-by: Lukas Reschke --- settings/js/federationsettingsview.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/settings/js/federationsettingsview.js b/settings/js/federationsettingsview.js index 9b38664d2f8..7a629fc2ab6 100644 --- a/settings/js/federationsettingsview.js +++ b/settings/js/federationsettingsview.js @@ -127,6 +127,14 @@ }, _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); -- 2.39.5