Ask for password when scope is changed
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
e87933bc3d
commit
16181c5463
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue