mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-08 06:01:22 +00:00
GUACAMOLE-5: Replace UserRESTService with new resource-driven implementation.
This commit is contained in:
@@ -50,9 +50,10 @@ angular.module('rest').factory('userService', ['$injector',
|
||||
* If null, no filtering will be performed. Valid values are listed
|
||||
* within PermissionSet.ObjectType.
|
||||
*
|
||||
* @returns {Promise.<User[]>}
|
||||
* A promise which will resolve with an array of @link{User} objects
|
||||
* upon success.
|
||||
* @returns {Promise.<Object.<String, User>>}
|
||||
* A promise which will resolve with a map of @link{User} objects
|
||||
* where each key is the identifier (username) of the corresponding
|
||||
* user.
|
||||
*/
|
||||
service.getUsers = function getUsers(dataSource, permissionTypes) {
|
||||
|
||||
|
@@ -227,14 +227,14 @@ angular.module('settings').directive('guacSettingsUsers', [function guacSettings
|
||||
PermissionSet.ObjectPermissionType.DELETE
|
||||
]);
|
||||
|
||||
userPromise.then(function usersReceived(userArrays) {
|
||||
userPromise.then(function usersReceived(allUsers) {
|
||||
|
||||
var addedUsers = {};
|
||||
$scope.manageableUsers = [];
|
||||
|
||||
// For each user in each data source
|
||||
angular.forEach(dataSources, function addUserList(dataSource) {
|
||||
angular.forEach(userArrays[dataSource], function addUser(user) {
|
||||
angular.forEach(allUsers[dataSource], function addUser(user) {
|
||||
|
||||
// Do not add the same user twice
|
||||
if (addedUsers[user.username])
|
||||
|
Reference in New Issue
Block a user