Index: /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.Designer.cs
===================================================================
--- /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.Designer.cs	(revision 15766)
+++ /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.Designer.cs	(revision 15767)
@@ -128,6 +128,6 @@
       this.projectsTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.projectsTreeView_AfterSelect);
       this.projectsTreeView.DragDrop += new System.Windows.Forms.DragEventHandler(this.projectsTreeView_DragDrop);
-      this.projectsTreeView.DragEnter += new System.Windows.Forms.DragEventHandler(this.projectsTreeView_DragEnter);
-      this.projectsTreeView.DragOver += new System.Windows.Forms.DragEventHandler(this.projectsTreeView_DragOver);
+      this.projectsTreeView.DragEnter += new System.Windows.Forms.DragEventHandler(this.projectsTreeView_DragEnterOver);
+      this.projectsTreeView.DragOver += new System.Windows.Forms.DragEventHandler(this.projectsTreeView_DragEnterOver);
       this.projectsTreeView.QueryContinueDrag += new System.Windows.Forms.QueryContinueDragEventHandler(this.projectsTreeView_QueryContinueDrag);
       // 
Index: /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.cs
===================================================================
--- /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.cs	(revision 15766)
+++ /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.cs	(revision 15767)
@@ -293,8 +293,10 @@
 
     private void projectsTreeView_DragDrop(object sender, DragEventArgs e) {
+      if (e.Effect == DragDropEffects.None) return;
+
       var sourceNode = (TreeNode)e.Data.GetData(typeof(TreeNode));
       if (sourceNode == null) return;
-      var sourceResource = ((Project)sourceNode.Tag);
-      if (sourceResource == null) return;
+      var sourceProject = ((Project)sourceNode.Tag);
+      if (sourceProject == null) return;
 
       var treeView = (TreeView)sender;
@@ -313,5 +315,13 @@
           MessageBoxButtons.OK,
           MessageBoxIcon.Information);
-            return;
+        return;
+      }
+      if(!HiveAdminClient.Instance.CheckParentChange(sourceProject, targetProject)) {
+        MessageBox.Show(
+          "You cannot drag to this project.",
+          "HeuristicLab Hive Administrator",
+          MessageBoxButtons.OK,
+          MessageBoxIcon.Information);
+      return;
       }
 
@@ -320,5 +330,5 @@
       } else {
         sourceNode.Parent.Nodes.Remove(sourceNode);
-        sourceResource.ParentProjectId = null;
+        sourceProject.ParentProjectId = null;
       }
 
@@ -327,8 +337,8 @@
       } else if(targetProject.Id != Guid.Empty) {
         targetNode.Nodes.Add(sourceNode);
-        sourceResource.ParentProjectId = targetProject.Id;
-      }
-
-      selectedProject = sourceResource;
+        sourceProject.ParentProjectId = targetProject.Id;
+      }
+
+      selectedProject = sourceProject;
       OnContentChanged();
     }
@@ -340,10 +350,23 @@
     }
 
-    private void projectsTreeView_DragEnter(object sender, DragEventArgs e) {
+    private void projectsTreeView_DragEnterOver(object sender, DragEventArgs e) {
       e.Effect = DragDropEffects.Move;
-    }
-
-    private void projectsTreeView_DragOver(object sender, DragEventArgs e) {
-      e.Effect = DragDropEffects.Move;
+
+      var sourceNode = (TreeNode)e.Data.GetData(typeof(TreeNode));
+      var sourceProject = ((Project)sourceNode.Tag);
+
+      var targetPoint = projectsTreeView.PointToClient(new Point(e.X, e.Y));
+      var targetNode = projectsTreeView.GetNodeAt(targetPoint);
+      var targetProject = (targetNode != null) ? (Project)targetNode.Tag : null;
+
+      if ((!IsAdmin() && (targetNode == null || targetProject == null))
+      || sourceNode == null
+      || sourceProject == null
+      || sourceNode == targetNode
+      || (targetProject != null && targetProject.Id == Guid.Empty)
+      || (targetProject != null && targetProject.Id == sourceProject.ParentProjectId)
+      || !HiveAdminClient.Instance.CheckParentChange(sourceProject, targetProject)) {
+        e.Effect = DragDropEffects.None;
+      }
     }
 
Index: /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.Designer.cs
===================================================================
--- /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.Designer.cs	(revision 15766)
+++ /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.Designer.cs	(revision 15767)
@@ -160,6 +160,6 @@
       this.treeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeSlaveGroup_AfterSelect);
       this.treeView.DragDrop += new System.Windows.Forms.DragEventHandler(this.treeSlaveGroup_DragDrop);
-      this.treeView.DragEnter += new System.Windows.Forms.DragEventHandler(this.treeSlaveGroup_DragEnter);
-      this.treeView.DragOver += new System.Windows.Forms.DragEventHandler(this.treeSlaveGroup_DragOver);
+      this.treeView.DragEnter += new System.Windows.Forms.DragEventHandler(this.treeSlaveGroup_DragEnterOver);
+      this.treeView.DragOver += new System.Windows.Forms.DragEventHandler(this.treeSlaveGroup_DragEnterOver);
       this.treeView.QueryContinueDrag += new System.Windows.Forms.QueryContinueDragEventHandler(this.treeSlaveGroup_QueryContinueDrag);
       // 
Index: /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs
===================================================================
--- /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs	(revision 15766)
+++ /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs	(revision 15767)
@@ -308,4 +308,6 @@
 
     private void treeSlaveGroup_DragDrop(object sender, DragEventArgs e) {
+      if (e.Effect == DragDropEffects.None) return;
+
       var sourceNode = (TreeNode)e.Data.GetData(typeof(TreeNode));
       if (sourceNode == null) return;
@@ -336,5 +338,5 @@
           MessageBoxIcon.Information);
         return;
-      } else if(targetResource != null && targetResource.Id == Guid.Empty) {
+      } else if (targetResource != null && targetResource.Id == Guid.Empty) {
         MessageBox.Show(
           "You cannot drag resources to a not yet stored resource group.",
@@ -342,5 +344,12 @@
           MessageBoxButtons.OK,
           MessageBoxIcon.Information);
-            return;
+        return;
+      } else if(!HiveAdminClient.Instance.CheckParentChange(sourceResource, targetResource)) {
+        MessageBox.Show(
+          "You cannot drag resources to this group.",
+          "HeuristicLab Hive Administrator",
+          MessageBoxButtons.OK,
+          MessageBoxIcon.Information);
+        return;
       } else if (targetNode != null && (targetNode.Text == ungroupedGroupName || targetNode.Parent != null && targetNode.Parent.Text == ungroupedGroupName)) {
         MessageBox.Show(
@@ -376,10 +385,25 @@
     }
 
-    private void treeSlaveGroup_DragEnter(object sender, DragEventArgs e) {
+    private void treeSlaveGroup_DragEnterOver(object sender, DragEventArgs e) {
       e.Effect = DragDropEffects.Move;
-    }
-
-    private void treeSlaveGroup_DragOver(object sender, DragEventArgs e) {
-      e.Effect = DragDropEffects.Move;
+
+      var sourceNode = (TreeNode)e.Data.GetData(typeof(TreeNode));
+      var sourceResource = ((Resource)sourceNode.Tag);
+
+      var targetPoint = treeView.PointToClient(new Point(e.X, e.Y));
+      var targetNode = treeView.GetNodeAt(targetPoint);
+      var targetResource = (targetNode != null) ? (Resource)targetNode.Tag : null;
+
+      if(!IsAdmin() 
+        || sourceNode == null 
+        || sourceResource == null 
+        || sourceNode == targetNode
+        || (targetResource != null && targetResource is Slave)
+        || (targetResource != null && targetResource.Id == Guid.Empty)
+        || (targetResource != null && targetResource.Id == sourceResource.ParentResourceId)
+        || !HiveAdminClient.Instance.CheckParentChange(sourceResource, targetResource)
+        || (targetNode != null && (targetNode.Text == ungroupedGroupName || targetNode.Parent != null && targetNode.Parent.Text == ungroupedGroupName))) {
+        e.Effect = DragDropEffects.None;
+      }
     }
 
