Ask for password when scope is changed

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
Lukas Reschke 2016-11-18 20:03:02 +01:00 committed by Roeland Jago Douma
parent e87933bc3d
commit 16181c5463
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 8 additions and 0 deletions

View File

@ -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);