Changeset 937 for trunk/sources
- Timestamp:
- 12/10/08 13:47:17 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Contracts/ApplicationConstants.cs
r934 r937 19 19 public static string RESPONSE_USERROLE_PERMISSIONOWNER_ADDED = "UserRole.PermissionOwnerAdded"; 20 20 public static string RESPONSE_USERROLE_GET_ALL_USERGROUPS = "UserRole.AllUserGroupsReturned"; 21 public static string RESPONSE_USERROLE_ID_MUST_NOT_BE_SET = "UserRole.IdMustNotBeSet"; 21 22 22 23 public static string RESPONSE_CLIENT_GET_ALL_CLIENTS = "Client.GetAllClients"; -
trunk/sources/HeuristicLab.Hive.Contracts/BusinessObjects/ClientGroup.cs
r934 r937 31 31 public class ClientGroup : Resource { 32 32 [DataMember] 33 public long ClientGroupId { get; set; }34 [DataMember]35 33 public List<Resource> Resources { get; set; } 36 34 -
trunk/sources/HeuristicLab.Hive.Contracts/HiveServerMessages.resx
r934 r937 178 178 <value>User successfully added to database</value> 179 179 </data> 180 <data name="UserRole.IdMustNotBeSet" xml:space="preserve"> 181 <value>In this context the id must not be set</value> 182 </data> 180 183 </root> -
trunk/sources/HeuristicLab.Hive.Server.Core/ClientManager.cs
r934 r937 43 43 clientGroups = new List<ClientGroup>(); 44 44 45 ClientGroup cg = new ClientGroup { ResourceId = 4, Name = "SuperGroup" , ClientGroupId = 1};45 ClientGroup cg = new ClientGroup { ResourceId = 4, Name = "SuperGroup" }; 46 46 cg.Resources = new List<Resource>(); 47 47 … … 78 78 79 79 public Response AddClientGroup(ClientGroup clientGroup) { 80 throw new NotImplementedException(); 80 Response response = new Response(); 81 82 ClientGroup clientGroupFromDb = clientGroupAdapter.GetClientGroupById(clientGroup.ResourceId); 83 84 85 return response; 81 86 } 82 87 -
trunk/sources/HeuristicLab.Hive.Server.Core/UserRoleManager.cs
r934 r937 37 37 Response response = new Response(); 38 38 39 User dbUser = userAdapter.GetUserByName(user.Name); 40 if (dbUser != null) { 39 if (user.PermissionOwnerId != null) { 41 40 response.Success = false; 42 response.StatusMessage = ApplicationConstants.RESPONSE_USERROLE_ USER_EXISTS_ALLREADY;41 response.StatusMessage = ApplicationConstants.RESPONSE_USERROLE_ID_MUST_NOT_BE_SET; 43 42 return response; 44 43 } … … 77 76 public Response AddNewUserGroup(UserGroup userGroup) { 78 77 Response response = new Response(); 79 80 UserGroup userGroupFromDb = userGroupAdapter.GetUserGroupById(userGroup.PermissionOwnerId); 81 if (userGroupFromDb != null) { 78 79 if (userGroup.PermissionOwnerId != null) { 82 80 response.Success = false; 83 response.StatusMessage = ApplicationConstants.RESPONSE_USERROLE_ USERGROUP_EXISTS_ALLREADY;81 response.StatusMessage = ApplicationConstants.RESPONSE_USERROLE_ID_MUST_NOT_BE_SET; 84 82 return response; 85 83 } … … 109 107 public Response AddPermissionOwnerToGroup(long groupId, PermissionOwner permissionOwner) { 110 108 Response response = new Response(); 111 109 110 if (permissionOwner.PermissionOwnerId != null) { 111 response.Success = false; 112 response.StatusMessage = ApplicationConstants.RESPONSE_USERROLE_ID_MUST_NOT_BE_SET; 113 return response; 114 } 115 112 116 UserGroup userGroup = userGroupAdapter.GetUserGroupById(groupId); 113 117 if (userGroup == null) {
Note: See TracChangeset
for help on using the changeset viewer.