Index: trunk/sources/HeuristicLab.Security.Contracts/BusinessObjects/GrantedPermission.cs
===================================================================
--- trunk/sources/HeuristicLab.Security.Contracts/BusinessObjects/GrantedPermission.cs	(revision 1384)
+++ trunk/sources/HeuristicLab.Security.Contracts/BusinessObjects/GrantedPermission.cs	(revision 1384)
@@ -0,0 +1,38 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.Security.Contracts.BusinessObjects {
+  
+  [DataContract]
+  public class GrantedPermission : PersistableObject {
+    [DataMember]
+    public Permission Permission { get; set; }
+    [DataMember]
+    public Guid EntityId { get; set; }
+    [DataMember]
+    public PermissionOwner PermissionOwner { get; set; }
+  }
+}
Index: trunk/sources/HeuristicLab.Security.Contracts/BusinessObjects/GrantedPermissions.cs
===================================================================
--- trunk/sources/HeuristicLab.Security.Contracts/BusinessObjects/GrantedPermissions.cs	(revision 1380)
+++ 	(revision )
@@ -1,39 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Runtime.Serialization;
-using HeuristicLab.DataAccess;
-
-namespace HeuristicLab.Security.Contracts.BusinessObjects {
-  
-  [DataContract]
-  public class GrantedPermissions : PersistableObject {
-    [DataMember]
-    public Permission Permission { get; set; }
-    [DataMember]
-    public Guid EntityId { get; set; }
-    [DataMember]
-    public PermissionOwner PermissionOwner { get; set; }
-  }
-}
Index: trunk/sources/HeuristicLab.Security.Contracts/BusinessObjects/Permission.cs
===================================================================
--- trunk/sources/HeuristicLab.Security.Contracts/BusinessObjects/Permission.cs	(revision 1380)
+++ trunk/sources/HeuristicLab.Security.Contracts/BusinessObjects/Permission.cs	(revision 1384)
@@ -24,5 +24,4 @@
 using System.Text;
 using System.Runtime.Serialization;
-using HeuristicLab.DataAccess;
 
 namespace HeuristicLab.Security.Contracts.BusinessObjects {
@@ -31,5 +30,8 @@
   public class Permission: PersistableObject {
     [DataMember]
-    public String Name { get; set; }
+    public String Description { get; set; }
+
+    [DataMember]
+    public Guid EntityId { get; set; }
   }
 }
Index: trunk/sources/HeuristicLab.Security.Contracts/BusinessObjects/PermissionOwner.cs
===================================================================
--- trunk/sources/HeuristicLab.Security.Contracts/BusinessObjects/PermissionOwner.cs	(revision 1380)
+++ trunk/sources/HeuristicLab.Security.Contracts/BusinessObjects/PermissionOwner.cs	(revision 1384)
@@ -24,5 +24,4 @@
 using System.Text;
 using System.Runtime.Serialization;
-using HeuristicLab.DataAccess;
 
 namespace HeuristicLab.Security.Contracts.BusinessObjects {
@@ -32,4 +31,7 @@
     [DataMember]
     public string Name { get; set; }
+
+    [DataMember]
+    public Guid EntityId { get; set; }
   }
 }
Index: trunk/sources/HeuristicLab.Security.Contracts/BusinessObjects/PersistableObject.cs
===================================================================
--- trunk/sources/HeuristicLab.Security.Contracts/BusinessObjects/PersistableObject.cs	(revision 1384)
+++ trunk/sources/HeuristicLab.Security.Contracts/BusinessObjects/PersistableObject.cs	(revision 1384)
@@ -0,0 +1,45 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.Security.Contracts {
+  [DataContract]
+  public class PersistableObject {
+    [DataMember]
+    public Guid Id { get; set; }
+
+    public override bool Equals(object obj) {
+      if (obj is PersistableObject)
+        return this.Id.Equals(
+          (obj as PersistableObject).Id);
+      else
+        return base.Equals(obj);
+    }
+
+    public override int GetHashCode() {
+      return this.Id.GetHashCode();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Security.Contracts/HeuristicLab.Security.Contracts.csproj
===================================================================
--- trunk/sources/HeuristicLab.Security.Contracts/HeuristicLab.Security.Contracts.csproj	(revision 1380)
+++ trunk/sources/HeuristicLab.Security.Contracts/HeuristicLab.Security.Contracts.csproj	(revision 1384)
@@ -42,9 +42,10 @@
   -->
   <ItemGroup>
-    <Compile Include="BusinessObjects\GrantedPermissions.cs" />
+    <Compile Include="BusinessObjects\GrantedPermission.cs" />
     <Compile Include="BusinessObjects\Permission.cs" />
     <Compile Include="BusinessObjects\PermissionOwner.cs" />
     <Compile Include="BusinessObjects\User.cs" />
     <Compile Include="BusinessObjects\UserGroup.cs" />
+    <Compile Include="BusinessObjects\PersistableObject.cs" />
     <Compile Include="SecurityContractsPlugin.cs" />
     <Compile Include="Interfaces\IPermissionManager.cs" />
Index: trunk/sources/HeuristicLab.Security.Contracts/Interfaces/IPermissionManager.cs
===================================================================
--- trunk/sources/HeuristicLab.Security.Contracts/Interfaces/IPermissionManager.cs	(revision 1380)
+++ trunk/sources/HeuristicLab.Security.Contracts/Interfaces/IPermissionManager.cs	(revision 1384)
@@ -6,5 +6,5 @@
   interface IPermissionManager {
     Guid Authenticate(String userName, String password);
-    bool CheckPermission(Guid sessionId, Guid permissionToken,
+    bool CheckPermission(Guid sessionId, Guid permissionId,
       Guid enitityId);
     void EndSession(Guid sessionId);
Index: trunk/sources/HeuristicLab.Security.Contracts/Interfaces/ISecurityManager.cs
===================================================================
--- trunk/sources/HeuristicLab.Security.Contracts/Interfaces/ISecurityManager.cs	(revision 1380)
+++ trunk/sources/HeuristicLab.Security.Contracts/Interfaces/ISecurityManager.cs	(revision 1384)
@@ -7,16 +7,16 @@
   interface ISecurityManager {
     User AddNewUser(User user);
-    bool RemoveUser(long userId);
+    bool RemoveUser(Guid userId);
     User UpdateUser(User user);
 
     UserGroup AddNewUserGroup(UserGroup group);
-    bool RemoveUserGroup(long groupId);
+    bool RemoveUserGroup(Guid groupId);
     UserGroup UpdateUserGroup(UserGroup group);
- 
-    bool AddPermissionOwnerToGroup(long groupId, long permissionOwnerId);
-    bool RemovePermissionOwnerFromGroup(long groupId, long permissionOwnerId);
 
-    bool GrantPermission(long permissionOwnerId, Guid permissionToken);
-    bool RevokePermission(long permissionOwnerId, Guid permissionToken);
+    bool AddPermissionOwnerToGroup(Guid groupId, Guid permissionOwnerId);
+    bool RemovePermissionOwnerFromGroup(Guid groupId, Guid permissionOwnerId);
+
+    bool GrantPermission(Guid permissionOwnerId, Guid permissionId);
+    bool RevokePermission(Guid permissionOwnerId, Guid permissionId);
   }
 }
