Exposed ldap got renamed to user directory
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user