diff --git a/dashboard/src/index.html b/dashboard/src/index.html
index 77fff5838..50268a5ee 100644
--- a/dashboard/src/index.html
+++ b/dashboard/src/index.html
@@ -180,7 +180,7 @@
{{ 'branding.title' | tr }}
{{ 'domains.title' | tr }}
{{ 'emails.title' | tr }}
- {{ 'user.settings.title' | tr }}
+ {{ 'users.settings.title' | tr }}
{{ 'eventlog.title' | tr }}
{{ 'network.title' | tr }}
{{ 'services.title' | tr }}
diff --git a/dashboard/src/views/users.html b/dashboard/src/views/users.html
index 383d575cc..e7aab9621 100644
--- a/dashboard/src/views/users.html
+++ b/dashboard/src/views/users.html
@@ -591,51 +591,4 @@
-
-
-
-
-
-
-
-
-
-
- {{ profileConfig.errorMessage }}
-
-
-
-
-
-
-
-
-
-
diff --git a/dashboard/src/views/users.js b/dashboard/src/views/users.js
index 82774ee8a..bc101a73d 100644
--- a/dashboard/src/views/users.js
+++ b/dashboard/src/views/users.js
@@ -826,50 +826,6 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
}
};
- $scope.profileConfig = {
- editableUserProfiles: true,
- mandatory2FA: false,
- errorMessage: '',
-
- refresh: function () {
- Client.getProfileConfig(function (error, result) {
- if (error) return console.error('Unable to get profile config.', error);
-
- $scope.profileConfig.editableUserProfiles = !result.lockUserProfiles;
- $scope.profileConfig.mandatory2FA = !!result.mandatory2FA;
- });
- },
-
- submit: function () {
- // prevent the current user from getting locked out
- if ($scope.profileConfig.mandatory2FA && !$scope.userInfo.twoFactorAuthenticationEnabled) return Client.notify('', $translate.instant('users.settings.require2FAWarning'), true, 'error', '#/profile');
-
- $scope.profileConfig.error = '';
- $scope.profileConfig.busy = true;
- $scope.profileConfig.success = false;
-
- var data = {
- lockUserProfiles: !$scope.profileConfig.editableUserProfiles,
- mandatory2FA: $scope.profileConfig.mandatory2FA
- };
-
- Client.setProfileConfig(data, function (error) {
- if (error) $scope.profileConfig.errorMessage = error.message;
-
- $scope.profileConfig.success = true;
-
- $scope.profileConfigForm.$setUntouched();
- $scope.profileConfigForm.$setPristine();
-
- Client.refreshConfig(); // refresh the $scope.config
-
- $timeout(function () {
- $scope.profileConfig.busy = false;
- }, 500);
- });
- }
- };
-
function getUsers(callback) {
var users = [];
@@ -965,7 +921,6 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
Client.onReady(function () {
refresh();
- if ($scope.user.isAtLeastAdmin) $scope.profileConfig.refresh();
if ($scope.user.isAtLeastAdmin) getAllDomains();
refreshAllUsers();
@@ -985,7 +940,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
// setup all the dialog focus handling
['userAddModal', 'userRemoveModal', 'userEditModal', 'groupAddModal', 'groupEditModal', 'groupRemoveModal'].forEach(function (id) {
$('#' + id).on('shown.bs.modal', function () {
- $(this).find("[autofocus]:first").focus();
+ $(this).find('[autofocus]:first').focus();
});
});