summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-11-18 18:34:01 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2016-11-21 11:30:02 +0100
commita0c64044b25ab4d6a80ac9bcf3084a8166de6e19 (patch)
tree84c931e5afc72bb8c717c9313c74a387bd9e532a
parentccf3e4255a8316d858f14bb08e5a60622700c31a (diff)
downloadnextcloud-server-a0c64044b25ab4d6a80ac9bcf3084a8166de6e19.tar.gz
nextcloud-server-a0c64044b25ab4d6a80ac9bcf3084a8166de6e19.zip
Make JS aware of password verification
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
-rw-r--r--settings/Controller/UsersController.php1
-rw-r--r--settings/js/federationsettingsview.js8
2 files changed, 9 insertions, 0 deletions
diff --git a/settings/Controller/UsersController.php b/settings/Controller/UsersController.php
index 8f077270392..77d65877ba3 100644
--- a/settings/Controller/UsersController.php
+++ b/settings/Controller/UsersController.php
@@ -672,6 +672,7 @@ class UsersController extends Controller {
* @todo merge into saveUserSettings
*
* @NoAdminRequired
+ * @PasswordConfirmationRequired
*
* @param string $username
* @param string $displayName
diff --git a/settings/js/federationsettingsview.js b/settings/js/federationsettingsview.js
index 7aaa225a861..e42828ca456 100644
--- a/settings/js/federationsettingsview.js
+++ b/settings/js/federationsettingsview.js
@@ -90,10 +90,18 @@
_onInputChanged: function(e) {
var self = this;
+ var $dialog = $('.oc-dialog:visible');
+ if (OC.PasswordConfirmation.requiresPasswordConfirmation()) {
+ if($dialog.length === 0) {
+ OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this._onInputChanged, this, e));
+ }
+ return;
+ }
var $target = $(e.target);
var value = $target.val();
var field = $target.attr('id');
this._config.set(field, value);
+
var savingData = this._config.save({
error: function(jqXHR) {
OC.msg.finishedSaving('#personal-settings-container .msg', jqXHR);