diff --git a/src/translation/en.json b/src/translation/en.json
index f6a6e76af..e047799ab 100644
--- a/src/translation/en.json
+++ b/src/translation/en.json
@@ -240,7 +240,8 @@
"primaryEmail": "Primary email",
"recoveryEmail": "Password recovery email",
"errorDisplayNameRequired": "Name is required",
- "activeCheckbox": "User is active"
+ "activeCheckbox": "User is active",
+ "passwordPlaceholder": "Optional. If provided, the admin can perform pre-setup tasks for the user."
},
"deleteUserDialog": {
"title": "Delete user {{ username }}",
diff --git a/src/views/users.html b/src/views/users.html
index d6313680c..c1483b55f 100644
--- a/src/views/users.html
+++ b/src/views/users.html
@@ -217,6 +217,7 @@
@@ -529,7 +530,7 @@
-
+
|
diff --git a/src/views/users.js b/src/views/users.js
index 443d0a19b..cee854285 100644
--- a/src/views/users.js
+++ b/src/views/users.js
@@ -228,6 +228,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
$scope.useredit = {
busy: false,
+ reset2FABusy: false,
error: {},
userInfo: {},
@@ -308,6 +309,17 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
$('#userEditModal').modal('hide');
});
});
+ },
+
+ reset2FA: function () {
+ $scope.useredit.reset2FABusy = true;
+
+ Client.disableTwoFactorAuthenticationByUserId($scope.useredit.userInfo.id, function (error) {
+ if (error) return console.error(error);
+
+ $scope.useredit.reset2FABusy = false;
+ $scope.useredit.userInfo.twoFactorAuthenticationEnabled = false;
+ });
}
};