mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 17:13:21 +00:00 
			
		
		
		
	GUAC-932: Rename various *DAO to *Service. Rename legacy services to legacy*, pending removal/refactor.
This commit is contained in:
		| @@ -27,7 +27,7 @@ angular.module('manage').controller('connectionGroupEditModalController', ['$sco | ||||
|         function connectionEditModalController($scope, $injector) { | ||||
|              | ||||
|     var connectionGroupEditModal        = $injector.get('connectionGroupEditModal'); | ||||
|     var connectionGroupDAO              = $injector.get('connectionGroupDAO'); | ||||
|     var connectionGroupService              = $injector.get('connectionGroupService'); | ||||
|     var displayObjectPreparationService = $injector.get('displayObjectPreparationService'); | ||||
|      | ||||
|     // Make a copy of the old connection group so that we can copy over the changes when done | ||||
| @@ -64,7 +64,7 @@ angular.module('manage').controller('connectionGroupEditModalController', ['$sco | ||||
|      * Save the connection and close the modal. | ||||
|      */ | ||||
|     $scope.save = function save() { | ||||
|         connectionGroupDAO.saveConnectionGroup($scope.connectionGroup).success(function successfullyUpdatedConnectionGroup() { | ||||
|         connectionGroupService.saveConnectionGroup($scope.connectionGroup).success(function successfullyUpdatedConnectionGroup() { | ||||
|              | ||||
|             // Prepare this connection group for display | ||||
|             displayObjectPreparationService.prepareConnectionGroup($scope.connectionGroup); | ||||
| @@ -79,7 +79,7 @@ angular.module('manage').controller('connectionGroupEditModalController', ['$sco | ||||
|             if(newConnectionGroup && newParentID === $scope.rootGroup.identifier) { | ||||
|                 $scope.moveItem($scope.connectionGroup, oldParentID, newParentID); | ||||
|             } else { | ||||
|                 connectionGroupDAO.moveConnectionGroup($scope.connectionGroup).then(function moveConnectionGroup() { | ||||
|                 connectionGroupService.moveConnectionGroup($scope.connectionGroup).then(function moveConnectionGroup() { | ||||
|                     $scope.moveItem($scope.connectionGroup, oldParentID, newParentID); | ||||
|                 }); | ||||
|             } | ||||
| @@ -99,7 +99,7 @@ angular.module('manage').controller('connectionGroupEditModalController', ['$sco | ||||
|             // Close the modal | ||||
|             connectionGroupEditModal.deactivate(); | ||||
|          | ||||
|         connectionGroupDAO.deleteConnectionGroup($scope.connectionGroup).success(function successfullyDeletedConnectionGroup() { | ||||
|         connectionGroupService.deleteConnectionGroup($scope.connectionGroup).success(function successfullyDeletedConnectionGroup() { | ||||
|             var oldParentID = oldConnectionGroup.parentIdentifier; | ||||
|              | ||||
|             // We have to remove this connection group from the heirarchy | ||||
|   | ||||
| @@ -27,13 +27,13 @@ angular.module('manage').controller('manageController', ['$scope', '$injector', | ||||
|         function manageController($scope, $injector) { | ||||
|              | ||||
|     // Get the dependencies commonJS style | ||||
|     var connectionGroupService      = $injector.get('connectionGroupService'); | ||||
|     var legacyConnectionGroupService      = $injector.get('legacyConnectionGroupService'); | ||||
|     var connectionEditModal         = $injector.get('connectionEditModal'); | ||||
|     var connectionGroupEditModal    = $injector.get('connectionGroupEditModal'); | ||||
|     var userEditModal               = $injector.get('userEditModal'); | ||||
|     var protocolDAO                 = $injector.get('protocolDAO'); | ||||
|     var userDAO                     = $injector.get('userDAO'); | ||||
|     var userService                 = $injector.get('userService'); | ||||
|     var protocolService                 = $injector.get('protocolService'); | ||||
|     var userService                     = $injector.get('userService'); | ||||
|     var legacyUserService                 = $injector.get('legacyUserService'); | ||||
|      | ||||
|     // Set status to loading until we have all the connections, groups, and users have loaded | ||||
|     $scope.loadingUsers         = true; | ||||
| @@ -46,13 +46,13 @@ angular.module('manage').controller('manageController', ['$scope', '$injector', | ||||
|     $scope.users = []; | ||||
|      | ||||
|     $scope.basicPermissionsLoaded.then(function basicPermissionsHaveBeenLoaded() { | ||||
|         connectionGroupService.getAllGroupsAndConnections([], undefined, true, true).then(function filterConnectionsAndGroups(rootGroupList) { | ||||
|         legacyConnectionGroupService.getAllGroupsAndConnections([], undefined, true, true).then(function filterConnectionsAndGroups(rootGroupList) { | ||||
|             $scope.rootGroup = rootGroupList[0]; | ||||
|             $scope.connectionsAndGroups = $scope.rootGroup.children; | ||||
|              | ||||
|             // Filter the items to only include ones that we have UPDATE for | ||||
|             if(!$scope.currentUserIsAdmin) { | ||||
|                 connectionGroupService.filterConnectionsAndGroupByPermission( | ||||
|                 legacyConnectionGroupService.filterConnectionsAndGroupByPermission( | ||||
|                     $scope.connectionsAndGroups, | ||||
|                     $scope.currentUserPermissions, | ||||
|                     { | ||||
| @@ -65,12 +65,12 @@ angular.module('manage').controller('manageController', ['$scope', '$injector', | ||||
|             $scope.loadingConnections = false;  | ||||
|         }); | ||||
|          | ||||
|         userDAO.getUsers().success(function filterEditableUsers(users) { | ||||
|         userService.getUsers().success(function filterEditableUsers(users) { | ||||
|             $scope.users = users; | ||||
|              | ||||
|             // Filter the users to only include ones that we have UPDATE for | ||||
|             if(!$scope.currentUserIsAdmin) { | ||||
|                 userService.filterUsersByPermission( | ||||
|                 legacyUserService.filterUsersByPermission( | ||||
|                     $scope.users, | ||||
|                     $scope.currentUserPermissions, | ||||
|                     'UPDATE' | ||||
| @@ -132,7 +132,7 @@ angular.module('manage').controller('manageController', ['$scope', '$injector', | ||||
|     $scope.protocols = {}; | ||||
|      | ||||
|     // Get the protocol information from the server and copy it into the scope | ||||
|     protocolDAO.getProtocols().success(function fetchProtocols(protocols) { | ||||
|     protocolService.getProtocols().success(function fetchProtocols(protocols) { | ||||
|         angular.extend($scope.protocols, protocols); | ||||
|     }); | ||||
|      | ||||
| @@ -236,7 +236,7 @@ angular.module('manage').controller('manageController', ['$scope', '$injector', | ||||
|                 username: $scope.newUsername | ||||
|             }; | ||||
|              | ||||
|             userDAO.createUser(newUser).success(function addUserToList() { | ||||
|             userService.createUser(newUser).success(function addUserToList() { | ||||
|                 $scope.users.push(newUser); | ||||
|             }); | ||||
|              | ||||
|   | ||||
| @@ -27,8 +27,8 @@ angular.module('manage').controller('userEditModalController', ['$scope', '$inje | ||||
|         function userEditModalController($scope, $injector) { | ||||
|              | ||||
|     var userEditModal                   = $injector.get('userEditModal'); | ||||
|     var userDAO                         = $injector.get('userDAO'); | ||||
|     var permissionDAO                   = $injector.get('permissionDAO'); | ||||
|     var userService                         = $injector.get('userService'); | ||||
|     var permissionService                   = $injector.get('permissionService'); | ||||
|      | ||||
|     // Make a copy of the old user so that we can copy over the changes when done | ||||
|     var oldUser = $scope.user; | ||||
| @@ -73,7 +73,7 @@ angular.module('manage').controller('userEditModalController', ['$scope', '$inje | ||||
|             return; | ||||
|         } | ||||
|          | ||||
|         userDAO.saveUser($scope.user).success(function successfullyUpdatedUser() { | ||||
|         userService.saveUser($scope.user).success(function successfullyUpdatedUser() { | ||||
|              | ||||
|             //Figure out what permissions have changed | ||||
|             var connectionPermissionsToCreate = [], | ||||
| @@ -182,7 +182,7 @@ angular.module('manage').controller('userEditModalController', ['$scope', '$inje | ||||
|              | ||||
|             if(permissionsToAdd.length || permissionsToRemove.length) { | ||||
|                 // Make the call to update the permissions | ||||
|                 permissionDAO.patchPermissions( | ||||
|                 permissionService.patchPermissions( | ||||
|                         $scope.user.username, permissionsToAdd, permissionsToRemove) | ||||
|                         .success(completeSaveProcess).error(handleFailure); | ||||
|             } else { | ||||
| @@ -205,7 +205,7 @@ angular.module('manage').controller('userEditModalController', ['$scope', '$inje | ||||
|         originalSystemPermissions; | ||||
|      | ||||
|     // Get the permissions for the user we are editing | ||||
|     permissionDAO.getPermissions($scope.user.username).success(function gotPermissions(permissions) { | ||||
|     permissionService.getPermissions($scope.user.username).success(function gotPermissions(permissions) { | ||||
|         $scope.permissions = permissions; | ||||
|          | ||||
|         // Figure out if the user has any system level permissions | ||||
| @@ -239,7 +239,7 @@ angular.module('manage').controller('userEditModalController', ['$scope', '$inje | ||||
|      * Delete the user and close the modal. | ||||
|      */ | ||||
|     $scope['delete'] = function deleteUser() { | ||||
|         userDAO.deleteUser($scope.user).success(function successfullyDeletedUser() { | ||||
|         userService.deleteUser($scope.user).success(function successfullyDeletedUser() { | ||||
|              | ||||
|             // Remove the user from the list | ||||
|             $scope.removeUser($scope.user); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user