Add initial ghost creation UI

This commit is contained in:
Johannes Zellner
2021-09-17 15:53:11 +02:00
parent a9b257c9ca
commit 8057b2454c
3 changed files with 109 additions and 0 deletions

View File

@@ -1882,6 +1882,19 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.setGhost = function (userId, password, expiresAt, callback) {
var data = { password };
if (expiresAt) data.expiresAt = expiresAt;
post('/api/v1/users/' + userId + '/ghost', data, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 204) return callback(new ClientError(status, data));
callback(null);
});
};
Client.prototype.startExternalLdapSync = function (callback) {
post('/api/v1/cloudron/sync_external_ldap', {}, null, function (error, data, status) {
if (error) return callback(error);