Index: trunk/sources/HeuristicLab.Hive.Contracts/ApplicationConstants.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Contracts/ApplicationConstants.cs	(revision 941)
+++ trunk/sources/HeuristicLab.Hive.Contracts/ApplicationConstants.cs	(revision 942)
@@ -23,4 +23,10 @@
     public static string RESPONSE_CLIENT_GET_ALL_CLIENTS = "Client.GetAllClients";
     public static string RESPONSE_CLIENT_GET_ALL_CLIENTGROUPS = "Client.GetAllClientGroups";
+    public static string RESPONSE_CLIENT_ID_MUST_NOT_BE_SET = "Client.IdMustNotBeSet";
+    public static string RESPONSE_CLIENT_CLIENTGROUP_ADDED = "Client.ClientGroupAdded";
+    public static string RESPONSE_CLIENT_CLIENTGROUP_DOESNT_EXIST = "Client.ClientGroupDoesntExist";
+    public static string RESPONSE_CLIENT_RESOURCE_ADDED_TO_GROUP = "Client.ResourceAddedToGroup";
+    public static string RESPONSE_CLIENT_RESOURCE_REMOVED = "Client.ResourceRemoved";
+    public static string RESPONSE_CLIENT_RESOURCE_NOT_FOUND = "Client.ResourceNotFound";
 
     public static string RESPONSE_COMMUNICATOR_HARDBEAT_RECEIVED = "Communicator.HeardbeatReceived";
Index: trunk/sources/HeuristicLab.Hive.Contracts/HiveServerMessages.resx
===================================================================
--- trunk/sources/HeuristicLab.Hive.Contracts/HiveServerMessages.resx	(revision 941)
+++ trunk/sources/HeuristicLab.Hive.Contracts/HiveServerMessages.resx	(revision 942)
@@ -178,4 +178,19 @@
     <value>User successfully added to database</value>
   </data>
+  <data name="Client.ClientGroupAdded" xml:space="preserve">
+    <value>ClientGroup successfully added</value>
+  </data>
+  <data name="Client.ClientGroupDoesntExist" xml:space="preserve">
+    <value>The specified ClientGroup doesn't exist</value>
+  </data>
+  <data name="Client.IdMustNotBeSet" xml:space="preserve">
+    <value>In this context the id must not be set</value>
+  </data>
+  <data name="Client.ResourceAddedToGroup" xml:space="preserve">
+    <value>Resource successfully added to ClientGroup</value>
+  </data>
+  <data name="Client.ResourceRemoved" xml:space="preserve">
+    <value>Resource successfully removed from ClientGroup</value>
+  </data>
   <data name="UserRole.IdMustNotBeSet" xml:space="preserve">
     <value>In this context the id must not be set</value>
Index: trunk/sources/HeuristicLab.Hive.Server.Core/ClientManager.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Core/ClientManager.cs	(revision 941)
+++ trunk/sources/HeuristicLab.Hive.Server.Core/ClientManager.cs	(revision 942)
@@ -80,6 +80,12 @@
       Response response = new Response();
 
-      ClientGroup clientGroupFromDb = clientGroupAdapter.GetClientGroupById(clientGroup.ResourceId);
-      
+      if (clientGroup.ResourceId != 0) {
+        response.Success = false;
+        response.StatusMessage = ApplicationConstants.RESPONSE_CLIENT_ID_MUST_NOT_BE_SET;
+        return response;
+      }
+      clientGroupAdapter.UpdateClientGroup(clientGroup);
+      response.Success = true;
+      response.StatusMessage = ApplicationConstants.RESPONSE_CLIENT_CLIENTGROUP_ADDED;
 
       return response;
@@ -87,9 +93,47 @@
 
     public Response AddResourceToGroup(long clientGroupId, Resource resource) {
-      throw new NotImplementedException();
+      Response response = new Response();
+
+      if (resource.ResourceId != 0) {
+        response.Success = false;
+        response.StatusMessage = ApplicationConstants.RESPONSE_CLIENT_ID_MUST_NOT_BE_SET;
+        return response;
+      }
+
+      ClientGroup clientGroup = clientGroupAdapter.GetClientGroupById(clientGroupId);
+      if (clientGroup == null) {
+        response.Success = false;
+        response.StatusMessage = ApplicationConstants.RESPONSE_CLIENT_CLIENTGROUP_DOESNT_EXIST;
+        return response;
+      }
+      clientGroup.Resources.Add(resource);
+
+      response.Success = true;
+      response.StatusMessage = ApplicationConstants.RESPONSE_CLIENT_RESOURCE_ADDED_TO_GROUP;
+
+      return response;
     }
 
     public Response DeleteResourceFromGroup(long clientGroupId, long resourceId) {
-      throw new NotImplementedException();
+      Response response = new Response();
+
+      ClientGroup clientGroup = clientGroupAdapter.GetClientGroupById(clientGroupId);
+      if (clientGroup == null) {
+        response.Success = false;
+        response.StatusMessage = ApplicationConstants.RESPONSE_CLIENT_CLIENTGROUP_DOESNT_EXIST;
+        return response;
+      }
+      foreach (Resource resource in clientGroup.Resources) {
+        if (resource.ResourceId == resourceId) {
+          clientGroup.Resources.Remove(resource);
+          response.Success = true;
+          response.StatusMessage = ApplicationConstants.RESPONSE_CLIENT_RESOURCE_REMOVED;
+          return response;
+        }
+      }
+      response.Success = false;
+      response.StatusMessage = ApplicationConstants.RESPONSE_CLIENT_RESOURCE_NOT_FOUND;
+
+      return response;
     }
     #endregion
Index: trunk/sources/HeuristicLab.Hive.Server.Core/UserRoleManager.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Core/UserRoleManager.cs	(revision 941)
+++ trunk/sources/HeuristicLab.Hive.Server.Core/UserRoleManager.cs	(revision 942)
@@ -37,5 +37,5 @@
       Response response = new Response();
 
-      if (user.PermissionOwnerId != null) {
+      if (user.PermissionOwnerId != 0) {
         response.Success = false;
         response.StatusMessage = ApplicationConstants.RESPONSE_USERROLE_ID_MUST_NOT_BE_SET;
@@ -77,5 +77,5 @@
       Response response = new Response();
       
-      if (userGroup.PermissionOwnerId != null) {
+      if (userGroup.PermissionOwnerId != 0) {
         response.Success = false;
         response.StatusMessage = ApplicationConstants.RESPONSE_USERROLE_ID_MUST_NOT_BE_SET;
@@ -108,5 +108,5 @@
       Response response = new Response();
 
-      if (permissionOwner.PermissionOwnerId != null) {
+      if (permissionOwner.PermissionOwnerId != 0) {
         response.Success = false;
         response.StatusMessage = ApplicationConstants.RESPONSE_USERROLE_ID_MUST_NOT_BE_SET;
