Show user selection for singleUser apps

This commit is contained in:
Johannes Zellner
2015-10-16 18:06:49 +02:00
parent 07063ca4f0
commit c9f84f6259
3 changed files with 52 additions and 31 deletions

View File

@@ -324,6 +324,13 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
}).error(defaultErrorHandler(callback));
};
Client.prototype.getUsers = function (callback) {
$http.get(client.apiOrigin + '/api/v1/users').success(function (data, status) {
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
callback(null, data.users);
}).error(defaultErrorHandler(callback));
};
Client.prototype.getNonApprovedApps = function (callback) {
if (!this._config.developerMode) return callback(null, []);