Require password confirmation when changing workflow rules
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
145da710a5
commit
410e0fc28f
|
@ -163,6 +163,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
delete: function() {
|
delete: function() {
|
||||||
|
if (OC.PasswordConfirmation.requiresPasswordConfirmation()) {
|
||||||
|
OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.delete, this));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.model.destroy();
|
this.model.destroy();
|
||||||
this.remove();
|
this.remove();
|
||||||
},
|
},
|
||||||
|
@ -173,6 +178,11 @@
|
||||||
this.render();
|
this.render();
|
||||||
},
|
},
|
||||||
save: function() {
|
save: function() {
|
||||||
|
if (OC.PasswordConfirmation.requiresPasswordConfirmation()) {
|
||||||
|
OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.save, this));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var success = function(model, response, options) {
|
var success = function(model, response, options) {
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
this.originalModel = JSON.parse(JSON.stringify(this.model));
|
this.originalModel = JSON.parse(JSON.stringify(this.model));
|
||||||
|
|
|
@ -58,6 +58,8 @@ class FlowOperations extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @PasswordConfirmationRequired
|
||||||
|
*
|
||||||
* @param string $class
|
* @param string $class
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param array[] $checks
|
* @param array[] $checks
|
||||||
|
@ -75,6 +77,8 @@ class FlowOperations extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @PasswordConfirmationRequired
|
||||||
|
*
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param array[] $checks
|
* @param array[] $checks
|
||||||
|
@ -92,6 +96,8 @@ class FlowOperations extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @PasswordConfirmationRequired
|
||||||
|
*
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @return JSONResponse
|
* @return JSONResponse
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue