Exposed ldap got renamed to user directory

This commit is contained in:
Johannes Zellner
2022-01-07 14:22:07 +01:00
parent 346dc4f861
commit 8bb4e947a0
3 changed files with 28 additions and 28 deletions

View File

@@ -689,40 +689,40 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
}
};
$scope.exposedLdapConfig = {
$scope.userDirectoryConfig = {
enabled: false,
allowlist: '',
error: null,
refresh: function () {
Client.getExposedLdapConfig(function (error, result) {
Client.getUserDirectoryConfig(function (error, result) {
if (error) return console.error('Unable to get exposed ldap config.', error);
$scope.exposedLdapConfig.enabled = !!result.enabled;
$scope.exposedLdapConfig.allowlist = result.allowlist;
$scope.userDirectoryConfig.enabled = !!result.enabled;
$scope.userDirectoryConfig.allowlist = result.allowlist;
});
},
submit: function () {
$scope.exposedLdapConfig.error = null;
$scope.exposedLdapConfig.busy = true;
$scope.exposedLdapConfig.success = false;
$scope.userDirectoryConfig.error = null;
$scope.userDirectoryConfig.busy = true;
$scope.userDirectoryConfig.success = false;
var data = {
enabled: $scope.exposedLdapConfig.enabled,
allowlist: $scope.exposedLdapConfig.allowlist
enabled: $scope.userDirectoryConfig.enabled,
allowlist: $scope.userDirectoryConfig.allowlist
};
Client.setExposedLdapConfig(data, function (error) {
$scope.exposedLdapConfig.busy = false;
Client.setUserDirectoryConfig(data, function (error) {
$scope.userDirectoryConfig.busy = false;
if (error && error.statusCode === 400) return $scope.exposedLdapConfig.error = { allowlist: error.message };
if (error) return $scope.exposedLdapConfig.error = { generic: error.message };
if (error && error.statusCode === 400) return $scope.userDirectoryConfig.error = { allowlist: error.message };
if (error) return $scope.userDirectoryConfig.error = { generic: error.message };
$scope.exposedLdapConfigForm.$setUntouched();
$scope.exposedLdapConfigForm.$setPristine();
$scope.userDirectoryConfigForm.$setUntouched();
$scope.userDirectoryConfigForm.$setPristine();
$scope.exposedLdapConfig.success = true;
$scope.userDirectoryConfig.success = true;
});
}
};
@@ -965,7 +965,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
Client.onReady(refresh);
Client.onReady(function () { if ($scope.user.isAtLeastAdmin) loadExternalLdapConfig(); });
Client.onReady(function () { if ($scope.user.isAtLeastAdmin) $scope.directoryConfig.refresh(); });
Client.onReady(function () { if ($scope.user.isAtLeastAdmin) $scope.exposedLdapConfig.refresh(); });
Client.onReady(function () { if ($scope.user.isAtLeastAdmin) $scope.userDirectoryConfig.refresh(); });
Client.onReady(refreshAllUsers);
Client.onReady(function () {
// Order matters for permissions used in canEdit