Index: /branches/HeuristicLab.Services.Authentication Prototype/HeuristicLab.Services.Authentication Prototyp.vsmdi
===================================================================
--- /branches/HeuristicLab.Services.Authentication Prototype/HeuristicLab.Services.Authentication Prototyp.vsmdi	(revision 3950)
+++ /branches/HeuristicLab.Services.Authentication Prototype/HeuristicLab.Services.Authentication Prototyp.vsmdi	(revision 3951)
@@ -6,19 +6,20 @@
   <TestList name="HeuristicLabUserTestList" id="8c8759cd-2720-49fa-8e40-35ae89286ea1" parentListId="8c43106b-9dc1-4907-a29f-aa66a61bf5b6">
     <TestLinks>
+      <TestLink id="23131c03-ebe9-6d64-7d73-52214a9dac7d" name="EmailTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
+      <TestLink id="d2c8a683-ac68-bded-8e0e-22e2473daa15" name="GetPasswordTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
+      <TestLink id="2b5d5229-e68f-6a88-fb76-73fa5d493613" name="LastPasswordChangedDateTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
+      <TestLink id="e3413b57-3027-8e7d-3f25-67842a5c6986" name="CommentTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
+      <TestLink id="5a5bdb37-43b0-c6f1-1b5b-7df4fecd3b8f" name="PasswordQuestionTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
       <TestLink id="c94ce8a9-0db1-d5f7-0d29-a5b40ed93b8f" name="ChangePasswordTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
+      <TestLink id="537e2ce5-1968-64c1-932a-0aff7f0ea564" name="ToStringTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
       <TestLink id="ecaca427-086c-9493-06af-9887f2d8184f" name="PasswordAnswerTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
+      <TestLink id="e0e05989-bce3-7e2f-d85f-30efe28be806" name="GetPasswordTest1" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
       <TestLink id="760cee90-ae54-277d-b10b-28dcbd0d3e2b" name="ResetPasswordTest1" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
-      <TestLink id="537e2ce5-1968-64c1-932a-0aff7f0ea564" name="ToStringTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
-      <TestLink id="b6e6a789-8f4e-329c-38ef-d9e19bd14e55" name="PasswordTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
-      <TestLink id="4452b5de-b1d7-2a87-17cf-5bcef24a98ba" name="modifyUserTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
-      <TestLink id="e0e05989-bce3-7e2f-d85f-30efe28be806" name="GetPasswordTest1" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
-      <TestLink id="ce8163d5-a5c1-2a43-04b4-3afe6a0140c3" name="ChangePasswordQuestionAndAnswerTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
-      <TestLink id="5a5bdb37-43b0-c6f1-1b5b-7df4fecd3b8f" name="PasswordQuestionTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
       <TestLink id="ce5df924-ff5f-962d-94e4-cbd375c40951" name="ResetPasswordTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
       <TestLink id="799ee04a-e351-af4d-61c5-344e29aaace3" name="UserNameTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
-      <TestLink id="23131c03-ebe9-6d64-7d73-52214a9dac7d" name="EmailTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
-      <TestLink id="d2c8a683-ac68-bded-8e0e-22e2473daa15" name="GetPasswordTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
-      <TestLink id="e3413b57-3027-8e7d-3f25-67842a5c6986" name="CommentTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
-      <TestLink id="2b5d5229-e68f-6a88-fb76-73fa5d493613" name="LastPasswordChangedDateTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
+      <TestLink id="b6e6a789-8f4e-329c-38ef-d9e19bd14e55" name="PasswordTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
+      <TestLink id="ce8163d5-a5c1-2a43-04b4-3afe6a0140c3" name="ChangePasswordQuestionAndAnswerTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
+      <TestLink id="903719dc-469b-6714-449e-0d776b005bcf" name="RoleExistsTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
+      <TestLink id="4452b5de-b1d7-2a87-17cf-5bcef24a98ba" name="modifyUserTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,   PublicKeyToken=b03f5f7f11d50a3a" />
     </TestLinks>
   </TestList>
Index: /branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml
===================================================================
--- /branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml	(revision 3950)
+++ /branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml	(revision 3951)
@@ -14,15 +14,13 @@
     </Type>
   </Table>
-  <Table Name="" Member="HeuristicLabAbstractRoles">
-    <Type Name="HeuristicLabAbstractRole" Modifier="Abstract">
+  <Table Name="" Member="HeuristicLabRole">
+    <Type Name="HeuristicLabRole">
       <Column Name="ID" Type="System.Int64" IsReadOnly="true" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
       <Column Name="roleName" Member="RoleName" Storage="_roleName" Type="System.String" CanBeNull="false" />
-      <Column Name="parentRoleID" Member="ParentRoleID" Storage="_parentRoleID" Type="System.Int64" CanBeNull="false" />
-      <Column Name="RoleType" Type="System.String" IsReadOnly="true" CanBeNull="false" IsDiscriminator="true" />
-      <Association Name="HeuristicLabAbstractRole_HeuristicLabAbstractRole" Member="HeuristicLabAbstractRole2" ThisKey="ID" OtherKey="ParentRoleID" Type="HeuristicLabAbstractRole" />
-      <Association Name="HeuristicLabAbstractRole_HeuristicLabUserRole" Member="HeuristicLabUserRole" ThisKey="ID" OtherKey="HeuristicLabRoleID" Type="HeuristicLabUserRole" />
-      <Association Name="HeuristicLabAbstractRole_HeuristicLabAbstractRole" Member="HeuristicLabAbstractRole1" ThisKey="ParentRoleID" OtherKey="ID" Type="HeuristicLabAbstractRole" IsForeignKey="true" />
-      <Type Name="HeuristicLabPermissionRole" InheritanceCode="permission" />
-      <Type Name="HeuristicLabRole" InheritanceCode="role" IsInheritanceDefault="true" />
+      <Column Name="parentRoleID" Member="ParentRoleID" Storage="_parentRoleID" Type="System.Int64" CanBeNull="true" />
+      <Column Name="IsPermission" Type="System.Boolean" CanBeNull="false" />
+      <Association Name="HeuristicLabRole_HeuristicLabUserRole" Member="HeuristicLabUserRole" ThisKey="ID" OtherKey="HeuristicLabRoleID" Type="HeuristicLabUserRole" />
+      <Association Name="HeuristicLabRole_HeuristicLabRole" Member="HeuristicLabRole2" ThisKey="ID" OtherKey="ParentRoleID" Type="HeuristicLabRole" />
+      <Association Name="HeuristicLabRole_HeuristicLabRole" Member="HeuristicLabRole1" ThisKey="ParentRoleID" OtherKey="ID" Type="HeuristicLabRole" IsForeignKey="true" />
     </Type>
   </Table>
@@ -33,5 +31,5 @@
       <Column Name="HeuristicLabRoleID" Type="System.Int64" CanBeNull="false" />
       <Association Name="HeuristicLabUser_HeuristicLabUserRole" Member="HeuristicLabUser" ThisKey="HeuristicLabUserID" OtherKey="ID" Type="HeuristicLabUser" IsForeignKey="true" />
-      <Association Name="HeuristicLabAbstractRole_HeuristicLabUserRole" Member="HeuristicLabAbstractRole" ThisKey="HeuristicLabRoleID" OtherKey="ID" Type="HeuristicLabAbstractRole" IsForeignKey="true" />
+      <Association Name="HeuristicLabRole_HeuristicLabUserRole" Member="HeuristicLabRole" Storage="_HeuristicLabAbstractRole" ThisKey="HeuristicLabRoleID" OtherKey="ID" Type="HeuristicLabRole" IsForeignKey="true" />
     </Type>
   </Table>
Index: /branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml.layout
===================================================================
--- /branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml.layout	(revision 3950)
+++ /branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml.layout	(revision 3951)
@@ -9,34 +9,10 @@
       </nestedChildShapes>
     </classShape>
-    <classShape Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" absoluteBounds="3.5, 0.875, 2, 1.5785953776041666">
-      <DataClassMoniker Name="/DataClassesDataContext/HeuristicLabAbstractRole" />
+    <classShape Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" absoluteBounds="4.875, 1.125, 2, 1.5785953776041666">
+      <DataClassMoniker Name="/DataClassesDataContext/HeuristicLabRole" />
       <nestedChildShapes>
-        <elementListCompartment Id="c418e826-fe22-4952-802e-047da829e949" absoluteBounds="3.5150000005960464, 1.3350000008940697, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
+        <elementListCompartment Id="c418e826-fe22-4952-802e-047da829e949" absoluteBounds="4.8900000005960464, 1.5850000008940697, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
       </nestedChildShapes>
     </classShape>
-    <classShape Id="b49c3eca-7de0-4ace-97ce-90212955db18" absoluteBounds="6.875, 0.75, 2, 0.8093896484375">
-      <DataClassMoniker Name="/DataClassesDataContext/HeuristicLabRole" />
-      <nestedChildShapes>
-        <elementListCompartment Id="b2f6a32c-1cff-4bb5-9008-e4e430125a0a" absoluteBounds="6.8900000000000006, 1.21, 1.9700000000000002, 0.2493896484375" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
-      </nestedChildShapes>
-    </classShape>
-    <classShape Id="d798095d-2715-4342-bc36-c2e6602a4fba" absoluteBounds="6.875, 2, 2, 0.80938964843749961">
-      <DataClassMoniker Name="/DataClassesDataContext/HeuristicLabPermissionRole" />
-      <nestedChildShapes>
-        <elementListCompartment Id="8328fcdb-eadc-4d44-9aa5-5ae334106ddd" absoluteBounds="6.89, 2.46, 1.9700000000000002, 0.2493896484375" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
-      </nestedChildShapes>
-    </classShape>
-    <inheritanceConnector edgePoints="[(5.5 : 2.22679768880208); (6.875 : 2.22679768880208)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
-      <nodes>
-        <classShapeMoniker Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" />
-        <classShapeMoniker Id="d798095d-2715-4342-bc36-c2e6602a4fba" />
-      </nodes>
-    </inheritanceConnector>
-    <inheritanceConnector edgePoints="[(5.5 : 1.21719482421875); (6.875 : 1.21719482421875)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
-      <nodes>
-        <classShapeMoniker Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" />
-        <classShapeMoniker Id="b49c3eca-7de0-4ace-97ce-90212955db18" />
-      </nodes>
-    </inheritanceConnector>
     <classShape Id="032f81a1-f00c-4b0f-b4fc-8cf872ad58a6" absoluteBounds="0.625, 3.625, 2, 1.3862939453124996">
       <DataClassMoniker Name="/DataClassesDataContext/HeuristicLabUserRole" />
@@ -52,6 +28,6 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(3.9687475 : 2.45359537760417); (3.9687475 : 4.35564697265625); (2.625 : 4.35564697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
-      <AssociationMoniker Name="/DataClassesDataContext/HeuristicLabAbstractRole/HeuristicLabAbstractRole_HeuristicLabUserRole" />
+    <associationConnector edgePoints="[(5.19495923189603 : 2.70359537760417); (5.19495923189603 : 4.31814697265625); (2.625 : 4.31814697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+      <AssociationMoniker Name="/DataClassesDataContext/HeuristicLabRole/HeuristicLabRole_HeuristicLabUserRole" />
       <nodes>
         <classShapeMoniker Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" />
@@ -59,6 +35,6 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(4.20242346379207 : 0.875); (4.20242346379207 : 0.625); (4.81174684745593 : 0.625); (4.81174684745593 : 0.875)]" fixedFrom="NotFixed" fixedTo="NotFixed">
-      <AssociationMoniker Name="/DataClassesDataContext/HeuristicLabAbstractRole/HeuristicLabAbstractRole_HeuristicLabAbstractRole" />
+    <associationConnector edgePoints="[(5.57742346379207 : 1.125); (5.57742346379207 : 0.875); (6.18674684745593 : 0.875); (6.18674684745593 : 1.125)]" fixedFrom="NotFixed" fixedTo="NotFixed">
+      <AssociationMoniker Name="/DataClassesDataContext/HeuristicLabRole/HeuristicLabRole_HeuristicLabRole" />
       <nodes>
         <classShapeMoniker Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" />
Index: /branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.designer.cs
===================================================================
--- /branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.designer.cs	(revision 3950)
+++ /branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.designer.cs	(revision 3951)
@@ -2,9 +2,9 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:2.0.50727.4927
+//     Dieser Code wurde von einem Tool generiert.
+//     Laufzeitversion:2.0.50727.4927
 //
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
+//     Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+//     der Code erneut generiert wird.
 // </auto-generated>
 //------------------------------------------------------------------------------
@@ -33,7 +33,7 @@
     partial void UpdateHeuristicLabUser(HeuristicLabUser instance);
     partial void DeleteHeuristicLabUser(HeuristicLabUser instance);
-    partial void InsertHeuristicLabAbstractRole(HeuristicLabAbstractRole instance);
-    partial void UpdateHeuristicLabAbstractRole(HeuristicLabAbstractRole instance);
-    partial void DeleteHeuristicLabAbstractRole(HeuristicLabAbstractRole instance);
+    partial void InsertHeuristicLabRole(HeuristicLabRole instance);
+    partial void UpdateHeuristicLabRole(HeuristicLabRole instance);
+    partial void DeleteHeuristicLabRole(HeuristicLabRole instance);
     partial void InsertHeuristicLabUserRole(HeuristicLabUserRole instance);
     partial void UpdateHeuristicLabUserRole(HeuristicLabUserRole instance);
@@ -73,9 +73,9 @@
 		}
 		
-		public System.Data.Linq.Table<HeuristicLabAbstractRole> HeuristicLabAbstractRoles
-		{
-			get
-			{
-				return this.GetTable<HeuristicLabAbstractRole>();
+		public System.Data.Linq.Table<HeuristicLabRole> HeuristicLabRole
+		{
+			get
+			{
+				return this.GetTable<HeuristicLabRole>();
 			}
 		}
@@ -297,7 +297,5 @@
 	
 	[Table(Name="")]
-	[InheritanceMapping(Code="permission", Type=typeof(HeuristicLabPermissionRole))]
-	[InheritanceMapping(Code="role", Type=typeof(HeuristicLabRole), IsDefault=true)]
-	public abstract partial class HeuristicLabAbstractRole : INotifyPropertyChanging, INotifyPropertyChanged
+	public partial class HeuristicLabRole : INotifyPropertyChanging, INotifyPropertyChanged
 	{
 		
@@ -308,13 +306,13 @@
 		private string _roleName;
 		
-		private long _parentRoleID;
-		
-		private string _RoleType = default(string);
-		
-		private EntitySet<HeuristicLabAbstractRole> _HeuristicLabAbstractRole2;
+		private System.Nullable<long> _parentRoleID;
+		
+		private bool _IsPermission;
 		
 		private EntitySet<HeuristicLabUserRole> _HeuristicLabUserRole;
 		
-		private EntityRef<HeuristicLabAbstractRole> _HeuristicLabAbstractRole1;
+		private EntitySet<HeuristicLabRole> _HeuristicLabRole2;
+		
+		private EntityRef<HeuristicLabRole> _HeuristicLabRole1;
 		
     #region Extensibility Method Definitions
@@ -324,13 +322,15 @@
     partial void OnRoleNameChanging(string value);
     partial void OnRoleNameChanged();
-    partial void OnParentRoleIDChanging(long value);
+    partial void OnParentRoleIDChanging(System.Nullable<long> value);
     partial void OnParentRoleIDChanged();
+    partial void OnIsPermissionChanging(bool value);
+    partial void OnIsPermissionChanged();
     #endregion
 		
-		public HeuristicLabAbstractRole()
-		{
-			this._HeuristicLabAbstractRole2 = new EntitySet<HeuristicLabAbstractRole>(new Action<HeuristicLabAbstractRole>(this.attach_HeuristicLabAbstractRole2), new Action<HeuristicLabAbstractRole>(this.detach_HeuristicLabAbstractRole2));
+		public HeuristicLabRole()
+		{
 			this._HeuristicLabUserRole = new EntitySet<HeuristicLabUserRole>(new Action<HeuristicLabUserRole>(this.attach_HeuristicLabUserRole), new Action<HeuristicLabUserRole>(this.detach_HeuristicLabUserRole));
-			this._HeuristicLabAbstractRole1 = default(EntityRef<HeuristicLabAbstractRole>);
+			this._HeuristicLabRole2 = new EntitySet<HeuristicLabRole>(new Action<HeuristicLabRole>(this.attach_HeuristicLabRole2), new Action<HeuristicLabRole>(this.detach_HeuristicLabRole2));
+			this._HeuristicLabRole1 = default(EntityRef<HeuristicLabRole>);
 			OnCreated();
 		}
@@ -366,5 +366,5 @@
 		
 		[Column(Name="parentRoleID", Storage="_parentRoleID")]
-		public long ParentRoleID
+		public System.Nullable<long> ParentRoleID
 		{
 			get
@@ -385,27 +385,25 @@
 		}
 		
-		[Column(Storage="_RoleType", CanBeNull=false, UpdateCheck=UpdateCheck.Never, IsDiscriminator=true)]
-		public string RoleType
-		{
-			get
-			{
-				return this._RoleType;
-			}
-		}
-		
-		[Association(Name="HeuristicLabAbstractRole_HeuristicLabAbstractRole", Storage="_HeuristicLabAbstractRole2", ThisKey="ID", OtherKey="ParentRoleID")]
-		public EntitySet<HeuristicLabAbstractRole> HeuristicLabAbstractRole2
-		{
-			get
-			{
-				return this._HeuristicLabAbstractRole2;
-			}
-			set
-			{
-				this._HeuristicLabAbstractRole2.Assign(value);
-			}
-		}
-		
-		[Association(Name="HeuristicLabAbstractRole_HeuristicLabUserRole", Storage="_HeuristicLabUserRole", ThisKey="ID", OtherKey="HeuristicLabRoleID")]
+		[Column(Storage="_IsPermission")]
+		public bool IsPermission
+		{
+			get
+			{
+				return this._IsPermission;
+			}
+			set
+			{
+				if ((this._IsPermission != value))
+				{
+					this.OnIsPermissionChanging(value);
+					this.SendPropertyChanging();
+					this._IsPermission = value;
+					this.SendPropertyChanged("IsPermission");
+					this.OnIsPermissionChanged();
+				}
+			}
+		}
+		
+		[Association(Name="HeuristicLabRole_HeuristicLabUserRole", Storage="_HeuristicLabUserRole", ThisKey="ID", OtherKey="HeuristicLabRoleID")]
 		public EntitySet<HeuristicLabUserRole> HeuristicLabUserRole
 		{
@@ -420,34 +418,47 @@
 		}
 		
-		[Association(Name="HeuristicLabAbstractRole_HeuristicLabAbstractRole", Storage="_HeuristicLabAbstractRole1", ThisKey="ParentRoleID", OtherKey="ID", IsForeignKey=true)]
-		public HeuristicLabAbstractRole HeuristicLabAbstractRole1
-		{
-			get
-			{
-				return this._HeuristicLabAbstractRole1.Entity;
-			}
-			set
-			{
-				HeuristicLabAbstractRole previousValue = this._HeuristicLabAbstractRole1.Entity;
+		[Association(Name="HeuristicLabRole_HeuristicLabRole", Storage="_HeuristicLabRole2", ThisKey="ID", OtherKey="ParentRoleID")]
+		public EntitySet<HeuristicLabRole> HeuristicLabRole2
+		{
+			get
+			{
+				return this._HeuristicLabRole2;
+			}
+			set
+			{
+				this._HeuristicLabRole2.Assign(value);
+			}
+		}
+		
+		[Association(Name="HeuristicLabRole_HeuristicLabRole", Storage="_HeuristicLabRole1", ThisKey="ParentRoleID", OtherKey="ID", IsForeignKey=true)]
+		public HeuristicLabRole HeuristicLabRole1
+		{
+			get
+			{
+				return this._HeuristicLabRole1.Entity;
+			}
+			set
+			{
+				HeuristicLabRole previousValue = this._HeuristicLabRole1.Entity;
 				if (((previousValue != value) 
-							|| (this._HeuristicLabAbstractRole1.HasLoadedOrAssignedValue == false)))
+							|| (this._HeuristicLabRole1.HasLoadedOrAssignedValue == false)))
 				{
 					this.SendPropertyChanging();
 					if ((previousValue != null))
 					{
-						this._HeuristicLabAbstractRole1.Entity = null;
-						previousValue.HeuristicLabAbstractRole2.Remove(this);
-					}
-					this._HeuristicLabAbstractRole1.Entity = value;
+						this._HeuristicLabRole1.Entity = null;
+						previousValue.HeuristicLabRole2.Remove(this);
+					}
+					this._HeuristicLabRole1.Entity = value;
 					if ((value != null))
 					{
-						value.HeuristicLabAbstractRole2.Add(this);
+						value.HeuristicLabRole2.Add(this);
 						this._parentRoleID = value.ID;
 					}
 					else
 					{
-						this._parentRoleID = default(long);
-					}
-					this.SendPropertyChanged("HeuristicLabAbstractRole1");
+						this._parentRoleID = default(Nullable<long>);
+					}
+					this.SendPropertyChanged("HeuristicLabRole1");
 				}
 			}
@@ -474,56 +485,26 @@
 		}
 		
-		private void attach_HeuristicLabAbstractRole2(HeuristicLabAbstractRole entity)
+		private void attach_HeuristicLabUserRole(HeuristicLabUserRole entity)
 		{
 			this.SendPropertyChanging();
-			entity.HeuristicLabAbstractRole1 = this;
-		}
-		
-		private void detach_HeuristicLabAbstractRole2(HeuristicLabAbstractRole entity)
+			entity.HeuristicLabRole = this;
+		}
+		
+		private void detach_HeuristicLabUserRole(HeuristicLabUserRole entity)
 		{
 			this.SendPropertyChanging();
-			entity.HeuristicLabAbstractRole1 = null;
-		}
-		
-		private void attach_HeuristicLabUserRole(HeuristicLabUserRole entity)
+			entity.HeuristicLabRole = null;
+		}
+		
+		private void attach_HeuristicLabRole2(HeuristicLabRole entity)
 		{
 			this.SendPropertyChanging();
-			entity.HeuristicLabAbstractRole = this;
-		}
-		
-		private void detach_HeuristicLabUserRole(HeuristicLabUserRole entity)
+			entity.HeuristicLabRole1 = this;
+		}
+		
+		private void detach_HeuristicLabRole2(HeuristicLabRole entity)
 		{
 			this.SendPropertyChanging();
-			entity.HeuristicLabAbstractRole = null;
-		}
-	}
-	
-	public partial class HeuristicLabPermissionRole : HeuristicLabAbstractRole
-	{
-		
-    #region Extensibility Method Definitions
-    partial void OnLoaded();
-    partial void OnValidate(System.Data.Linq.ChangeAction action);
-    partial void OnCreated();
-    #endregion
-		
-		public HeuristicLabPermissionRole()
-		{
-			OnCreated();
-		}
-	}
-	
-	public partial class HeuristicLabRole : HeuristicLabAbstractRole
-	{
-		
-    #region Extensibility Method Definitions
-    partial void OnLoaded();
-    partial void OnValidate(System.Data.Linq.ChangeAction action);
-    partial void OnCreated();
-    #endregion
-		
-		public HeuristicLabRole()
-		{
-			OnCreated();
+			entity.HeuristicLabRole1 = null;
 		}
 	}
@@ -543,5 +524,5 @@
 		private EntityRef<HeuristicLabUser> _HeuristicLabUser;
 		
-		private EntityRef<HeuristicLabAbstractRole> _HeuristicLabAbstractRole;
+		private EntityRef<HeuristicLabRole> _HeuristicLabAbstractRole;
 		
     #region Extensibility Method Definitions
@@ -560,5 +541,5 @@
 		{
 			this._HeuristicLabUser = default(EntityRef<HeuristicLabUser>);
-			this._HeuristicLabAbstractRole = default(EntityRef<HeuristicLabAbstractRole>);
+			this._HeuristicLabAbstractRole = default(EntityRef<HeuristicLabRole>);
 			OnCreated();
 		}
@@ -666,6 +647,6 @@
 		}
 		
-		[Association(Name="HeuristicLabAbstractRole_HeuristicLabUserRole", Storage="_HeuristicLabAbstractRole", ThisKey="HeuristicLabRoleID", OtherKey="ID", IsForeignKey=true)]
-		public HeuristicLabAbstractRole HeuristicLabAbstractRole
+		[Association(Name="HeuristicLabRole_HeuristicLabUserRole", Storage="_HeuristicLabAbstractRole", ThisKey="HeuristicLabRoleID", OtherKey="ID", IsForeignKey=true)]
+		public HeuristicLabRole HeuristicLabRole
 		{
 			get
@@ -675,5 +656,5 @@
 			set
 			{
-				HeuristicLabAbstractRole previousValue = this._HeuristicLabAbstractRole.Entity;
+				HeuristicLabRole previousValue = this._HeuristicLabAbstractRole.Entity;
 				if (((previousValue != value) 
 							|| (this._HeuristicLabAbstractRole.HasLoadedOrAssignedValue == false)))
@@ -695,5 +676,5 @@
 						this._HeuristicLabRoleID = default(long);
 					}
-					this.SendPropertyChanged("HeuristicLabAbstractRole");
+					this.SendPropertyChanged("HeuristicLabRole");
 				}
 			}
Index: /branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabRoleProvider.cs
===================================================================
--- /branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabRoleProvider.cs	(revision 3950)
+++ /branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabRoleProvider.cs	(revision 3951)
@@ -1,4 +1,5 @@
 ﻿using System;
 using System.Web.Security;
+using System.Linq;
 using Persistence;
 
@@ -51,5 +52,10 @@
 
     public override bool RoleExists(string roleName) {
-      throw new NotImplementedException();
+
+      Persistence.DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext();
+      bool returnValue = (DatabaseUtil.createDataClassesDataContext().HeuristicLabRole.Count(r => r.RoleName == roleName) == 1);
+      db.Connection.Close();
+      return returnValue;
+
     }
   }
Index: /branches/HeuristicLab.Services.Authentication Prototype/UnitTests/HeuristicLabRoleProviderTest.cs
===================================================================
--- /branches/HeuristicLab.Services.Authentication Prototype/UnitTests/HeuristicLabRoleProviderTest.cs	(revision 3950)
+++ /branches/HeuristicLab.Services.Authentication Prototype/UnitTests/HeuristicLabRoleProviderTest.cs	(revision 3951)
@@ -9,5 +9,5 @@
   public class HeuristicLabRoleProviderTest : AbstractHeuristicLabTest {
     private TestContext testContextInstance;
-
+    private const string TEST_ROLE_NAME = "testRole";
     /// <summary>
     ///Gets or sets the test context which provides
@@ -69,15 +69,16 @@
 
     /// <summary>
-    ///A test for RoleExists
+    ///tests if the RoleExits method works --> test is done in a positiv and negativ way
     ///</summary>
     [TestMethod()]
     public void RoleExistsTest() {
-      HeuristicLabRoleProvider target = new HeuristicLabRoleProvider(); // TODO: Initialize to an appropriate value
-      string roleName = string.Empty; // TODO: Initialize to an appropriate value
-      bool expected = false; // TODO: Initialize to an appropriate value
-      bool actual;
-      actual = target.RoleExists(roleName);
-      Assert.AreEqual(expected, actual);
-      Assert.Inconclusive("Verify the correctness of this test method.");
+      HeuristicLabRoleProvider target = new HeuristicLabRoleProvider();
+      Persistence.HeuristicLabRole role = new Persistence.HeuristicLabRole();
+      role.RoleName = TEST_ROLE_NAME;
+      Persistence.DataClassesDataContext db = Persistence.DatabaseUtil.createDataClassesDataContext();
+      db.HeuristicLabRole.InsertOnSubmit((Persistence.HeuristicLabRole)role);
+      db.SubmitChanges();
+      Assert.IsTrue(target.RoleExists(TEST_ROLE_NAME));
+      Assert.IsFalse(target.RoleExists(TEST_ROLE_NAME + TEST_ROLE_NAME));
     }
 
