Add UI to make user local

This commit is contained in:
Johannes Zellner
2022-04-24 22:11:35 +02:00
parent a8a995ca05
commit b3570a9faa
3 changed files with 57 additions and 2 deletions

View File

@@ -1943,6 +1943,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
}
};
Client.prototype.makeUserLocal = function (userId, callback) {
post('/api/v1/users/' + userId + '/make_local', {}, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 204) return callback(new ClientError(status, data));
callback(null);
});
};
Client.prototype.changePassword = function (currentPassword, newPassword, callback) {
var data = {
password: currentPassword,