- Timestamp:
- 06/25/10 19:48:26 (14 years ago)
- Location:
- branches/HeuristicLab.Services.Authentication Prototype
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Services.Authentication Prototype/HeuristicLab.Services.Authentication Prototyp.vsmdi
r3949 r3951 6 6 <TestList name="HeuristicLabUserTestList" id="8c8759cd-2720-49fa-8e40-35ae89286ea1" parentListId="8c43106b-9dc1-4907-a29f-aa66a61bf5b6"> 7 7 <TestLinks> 8 <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" /> 9 <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" /> 10 <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" /> 11 <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" /> 12 <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" /> 8 13 <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" /> 14 <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" /> 9 15 <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" /> 16 <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" /> 10 17 <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" /> 11 <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" />12 <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" />13 <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" />14 <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" />15 <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" />16 <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" />17 18 <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" /> 18 19 <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" /> 19 <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" />20 <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" />21 <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" />22 <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" />20 <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" /> 21 <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" /> 22 <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" /> 23 <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" /> 23 24 </TestLinks> 24 25 </TestList> -
branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml
r3943 r3951 14 14 </Type> 15 15 </Table> 16 <Table Name="" Member="HeuristicLab AbstractRoles">17 <Type Name="HeuristicLab AbstractRole" Modifier="Abstract">16 <Table Name="" Member="HeuristicLabRole"> 17 <Type Name="HeuristicLabRole"> 18 18 <Column Name="ID" Type="System.Int64" IsReadOnly="true" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" /> 19 19 <Column Name="roleName" Member="RoleName" Storage="_roleName" Type="System.String" CanBeNull="false" /> 20 <Column Name="parentRoleID" Member="ParentRoleID" Storage="_parentRoleID" Type="System.Int64" CanBeNull="false" /> 21 <Column Name="RoleType" Type="System.String" IsReadOnly="true" CanBeNull="false" IsDiscriminator="true" /> 22 <Association Name="HeuristicLabAbstractRole_HeuristicLabAbstractRole" Member="HeuristicLabAbstractRole2" ThisKey="ID" OtherKey="ParentRoleID" Type="HeuristicLabAbstractRole" /> 23 <Association Name="HeuristicLabAbstractRole_HeuristicLabUserRole" Member="HeuristicLabUserRole" ThisKey="ID" OtherKey="HeuristicLabRoleID" Type="HeuristicLabUserRole" /> 24 <Association Name="HeuristicLabAbstractRole_HeuristicLabAbstractRole" Member="HeuristicLabAbstractRole1" ThisKey="ParentRoleID" OtherKey="ID" Type="HeuristicLabAbstractRole" IsForeignKey="true" /> 25 <Type Name="HeuristicLabPermissionRole" InheritanceCode="permission" /> 26 <Type Name="HeuristicLabRole" InheritanceCode="role" IsInheritanceDefault="true" /> 20 <Column Name="parentRoleID" Member="ParentRoleID" Storage="_parentRoleID" Type="System.Int64" CanBeNull="true" /> 21 <Column Name="IsPermission" Type="System.Boolean" CanBeNull="false" /> 22 <Association Name="HeuristicLabRole_HeuristicLabUserRole" Member="HeuristicLabUserRole" ThisKey="ID" OtherKey="HeuristicLabRoleID" Type="HeuristicLabUserRole" /> 23 <Association Name="HeuristicLabRole_HeuristicLabRole" Member="HeuristicLabRole2" ThisKey="ID" OtherKey="ParentRoleID" Type="HeuristicLabRole" /> 24 <Association Name="HeuristicLabRole_HeuristicLabRole" Member="HeuristicLabRole1" ThisKey="ParentRoleID" OtherKey="ID" Type="HeuristicLabRole" IsForeignKey="true" /> 27 25 </Type> 28 26 </Table> … … 33 31 <Column Name="HeuristicLabRoleID" Type="System.Int64" CanBeNull="false" /> 34 32 <Association Name="HeuristicLabUser_HeuristicLabUserRole" Member="HeuristicLabUser" ThisKey="HeuristicLabUserID" OtherKey="ID" Type="HeuristicLabUser" IsForeignKey="true" /> 35 <Association Name="HeuristicLab AbstractRole_HeuristicLabUserRole" Member="HeuristicLabAbstractRole" ThisKey="HeuristicLabRoleID" OtherKey="ID" Type="HeuristicLabAbstractRole" IsForeignKey="true" />33 <Association Name="HeuristicLabRole_HeuristicLabUserRole" Member="HeuristicLabRole" Storage="_HeuristicLabAbstractRole" ThisKey="HeuristicLabRoleID" OtherKey="ID" Type="HeuristicLabRole" IsForeignKey="true" /> 36 34 </Type> 37 35 </Table> -
branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml.layout
r3943 r3951 9 9 </nestedChildShapes> 10 10 </classShape> 11 <classShape Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" absoluteBounds=" 3.5, 0.875, 2, 1.5785953776041666">12 <DataClassMoniker Name="/DataClassesDataContext/HeuristicLab AbstractRole" />11 <classShape Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" absoluteBounds="4.875, 1.125, 2, 1.5785953776041666"> 12 <DataClassMoniker Name="/DataClassesDataContext/HeuristicLabRole" /> 13 13 <nestedChildShapes> 14 <elementListCompartment Id="c418e826-fe22-4952-802e-047da829e949" absoluteBounds=" 3.5150000005960464, 1.3350000008940697, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />14 <elementListCompartment Id="c418e826-fe22-4952-802e-047da829e949" absoluteBounds="4.8900000005960464, 1.5850000008940697, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 15 15 </nestedChildShapes> 16 16 </classShape> 17 <classShape Id="b49c3eca-7de0-4ace-97ce-90212955db18" absoluteBounds="6.875, 0.75, 2, 0.8093896484375">18 <DataClassMoniker Name="/DataClassesDataContext/HeuristicLabRole" />19 <nestedChildShapes>20 <elementListCompartment Id="b2f6a32c-1cff-4bb5-9008-e4e430125a0a" absoluteBounds="6.8900000000000006, 1.21, 1.9700000000000002, 0.2493896484375" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />21 </nestedChildShapes>22 </classShape>23 <classShape Id="d798095d-2715-4342-bc36-c2e6602a4fba" absoluteBounds="6.875, 2, 2, 0.80938964843749961">24 <DataClassMoniker Name="/DataClassesDataContext/HeuristicLabPermissionRole" />25 <nestedChildShapes>26 <elementListCompartment Id="8328fcdb-eadc-4d44-9aa5-5ae334106ddd" absoluteBounds="6.89, 2.46, 1.9700000000000002, 0.2493896484375" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />27 </nestedChildShapes>28 </classShape>29 <inheritanceConnector edgePoints="[(5.5 : 2.22679768880208); (6.875 : 2.22679768880208)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">30 <nodes>31 <classShapeMoniker Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" />32 <classShapeMoniker Id="d798095d-2715-4342-bc36-c2e6602a4fba" />33 </nodes>34 </inheritanceConnector>35 <inheritanceConnector edgePoints="[(5.5 : 1.21719482421875); (6.875 : 1.21719482421875)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">36 <nodes>37 <classShapeMoniker Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" />38 <classShapeMoniker Id="b49c3eca-7de0-4ace-97ce-90212955db18" />39 </nodes>40 </inheritanceConnector>41 17 <classShape Id="032f81a1-f00c-4b0f-b4fc-8cf872ad58a6" absoluteBounds="0.625, 3.625, 2, 1.3862939453124996"> 42 18 <DataClassMoniker Name="/DataClassesDataContext/HeuristicLabUserRole" /> … … 52 28 </nodes> 53 29 </associationConnector> 54 <associationConnector edgePoints="[( 3.9687475 : 2.45359537760417); (3.9687475 : 4.35564697265625); (2.625 : 4.35564697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">55 <AssociationMoniker Name="/DataClassesDataContext/HeuristicLab AbstractRole/HeuristicLabAbstractRole_HeuristicLabUserRole" />30 <associationConnector edgePoints="[(5.19495923189603 : 2.70359537760417); (5.19495923189603 : 4.31814697265625); (2.625 : 4.31814697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 31 <AssociationMoniker Name="/DataClassesDataContext/HeuristicLabRole/HeuristicLabRole_HeuristicLabUserRole" /> 56 32 <nodes> 57 33 <classShapeMoniker Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" /> … … 59 35 </nodes> 60 36 </associationConnector> 61 <associationConnector edgePoints="[( 4.20242346379207 : 0.875); (4.20242346379207 : 0.625); (4.81174684745593 : 0.625); (4.81174684745593 : 0.875)]" fixedFrom="NotFixed" fixedTo="NotFixed">62 <AssociationMoniker Name="/DataClassesDataContext/HeuristicLab AbstractRole/HeuristicLabAbstractRole_HeuristicLabAbstractRole" />37 <associationConnector edgePoints="[(5.57742346379207 : 1.125); (5.57742346379207 : 0.875); (6.18674684745593 : 0.875); (6.18674684745593 : 1.125)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 38 <AssociationMoniker Name="/DataClassesDataContext/HeuristicLabRole/HeuristicLabRole_HeuristicLabRole" /> 63 39 <nodes> 64 40 <classShapeMoniker Id="c7373ccc-61b3-43fb-88fa-14149d69bee9" /> -
branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.designer.cs
r3943 r3951 2 2 //------------------------------------------------------------------------------ 3 3 // <auto-generated> 4 // This code was generated by a tool.5 // Runtime Version:2.0.50727.49274 // Dieser Code wurde von einem Tool generiert. 5 // Laufzeitversion:2.0.50727.4927 6 6 // 7 // Changes to this file may cause incorrect behavior and will be lost if8 // the code is regenerated.7 // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn 8 // der Code erneut generiert wird. 9 9 // </auto-generated> 10 10 //------------------------------------------------------------------------------ … … 33 33 partial void UpdateHeuristicLabUser(HeuristicLabUser instance); 34 34 partial void DeleteHeuristicLabUser(HeuristicLabUser instance); 35 partial void InsertHeuristicLab AbstractRole(HeuristicLabAbstractRole instance);36 partial void UpdateHeuristicLab AbstractRole(HeuristicLabAbstractRole instance);37 partial void DeleteHeuristicLab AbstractRole(HeuristicLabAbstractRole instance);35 partial void InsertHeuristicLabRole(HeuristicLabRole instance); 36 partial void UpdateHeuristicLabRole(HeuristicLabRole instance); 37 partial void DeleteHeuristicLabRole(HeuristicLabRole instance); 38 38 partial void InsertHeuristicLabUserRole(HeuristicLabUserRole instance); 39 39 partial void UpdateHeuristicLabUserRole(HeuristicLabUserRole instance); … … 73 73 } 74 74 75 public System.Data.Linq.Table<HeuristicLab AbstractRole> HeuristicLabAbstractRoles76 { 77 get 78 { 79 return this.GetTable<HeuristicLab AbstractRole>();75 public System.Data.Linq.Table<HeuristicLabRole> HeuristicLabRole 76 { 77 get 78 { 79 return this.GetTable<HeuristicLabRole>(); 80 80 } 81 81 } … … 297 297 298 298 [Table(Name="")] 299 [InheritanceMapping(Code="permission", Type=typeof(HeuristicLabPermissionRole))] 300 [InheritanceMapping(Code="role", Type=typeof(HeuristicLabRole), IsDefault=true)] 301 public abstract partial class HeuristicLabAbstractRole : INotifyPropertyChanging, INotifyPropertyChanged 299 public partial class HeuristicLabRole : INotifyPropertyChanging, INotifyPropertyChanged 302 300 { 303 301 … … 308 306 private string _roleName; 309 307 310 private long _parentRoleID; 311 312 private string _RoleType = default(string); 313 314 private EntitySet<HeuristicLabAbstractRole> _HeuristicLabAbstractRole2; 308 private System.Nullable<long> _parentRoleID; 309 310 private bool _IsPermission; 315 311 316 312 private EntitySet<HeuristicLabUserRole> _HeuristicLabUserRole; 317 313 318 private EntityRef<HeuristicLabAbstractRole> _HeuristicLabAbstractRole1; 314 private EntitySet<HeuristicLabRole> _HeuristicLabRole2; 315 316 private EntityRef<HeuristicLabRole> _HeuristicLabRole1; 319 317 320 318 #region Extensibility Method Definitions … … 324 322 partial void OnRoleNameChanging(string value); 325 323 partial void OnRoleNameChanged(); 326 partial void OnParentRoleIDChanging( longvalue);324 partial void OnParentRoleIDChanging(System.Nullable<long> value); 327 325 partial void OnParentRoleIDChanged(); 326 partial void OnIsPermissionChanging(bool value); 327 partial void OnIsPermissionChanged(); 328 328 #endregion 329 329 330 public HeuristicLabAbstractRole() 331 { 332 this._HeuristicLabAbstractRole2 = new EntitySet<HeuristicLabAbstractRole>(new Action<HeuristicLabAbstractRole>(this.attach_HeuristicLabAbstractRole2), new Action<HeuristicLabAbstractRole>(this.detach_HeuristicLabAbstractRole2)); 330 public HeuristicLabRole() 331 { 333 332 this._HeuristicLabUserRole = new EntitySet<HeuristicLabUserRole>(new Action<HeuristicLabUserRole>(this.attach_HeuristicLabUserRole), new Action<HeuristicLabUserRole>(this.detach_HeuristicLabUserRole)); 334 this._HeuristicLabAbstractRole1 = default(EntityRef<HeuristicLabAbstractRole>); 333 this._HeuristicLabRole2 = new EntitySet<HeuristicLabRole>(new Action<HeuristicLabRole>(this.attach_HeuristicLabRole2), new Action<HeuristicLabRole>(this.detach_HeuristicLabRole2)); 334 this._HeuristicLabRole1 = default(EntityRef<HeuristicLabRole>); 335 335 OnCreated(); 336 336 } … … 366 366 367 367 [Column(Name="parentRoleID", Storage="_parentRoleID")] 368 public longParentRoleID368 public System.Nullable<long> ParentRoleID 369 369 { 370 370 get … … 385 385 } 386 386 387 [Column(Storage="_RoleType", CanBeNull=false, UpdateCheck=UpdateCheck.Never, IsDiscriminator=true)] 388 public string RoleType 389 { 390 get 391 { 392 return this._RoleType; 393 } 394 } 395 396 [Association(Name="HeuristicLabAbstractRole_HeuristicLabAbstractRole", Storage="_HeuristicLabAbstractRole2", ThisKey="ID", OtherKey="ParentRoleID")] 397 public EntitySet<HeuristicLabAbstractRole> HeuristicLabAbstractRole2 398 { 399 get 400 { 401 return this._HeuristicLabAbstractRole2; 402 } 403 set 404 { 405 this._HeuristicLabAbstractRole2.Assign(value); 406 } 407 } 408 409 [Association(Name="HeuristicLabAbstractRole_HeuristicLabUserRole", Storage="_HeuristicLabUserRole", ThisKey="ID", OtherKey="HeuristicLabRoleID")] 387 [Column(Storage="_IsPermission")] 388 public bool IsPermission 389 { 390 get 391 { 392 return this._IsPermission; 393 } 394 set 395 { 396 if ((this._IsPermission != value)) 397 { 398 this.OnIsPermissionChanging(value); 399 this.SendPropertyChanging(); 400 this._IsPermission = value; 401 this.SendPropertyChanged("IsPermission"); 402 this.OnIsPermissionChanged(); 403 } 404 } 405 } 406 407 [Association(Name="HeuristicLabRole_HeuristicLabUserRole", Storage="_HeuristicLabUserRole", ThisKey="ID", OtherKey="HeuristicLabRoleID")] 410 408 public EntitySet<HeuristicLabUserRole> HeuristicLabUserRole 411 409 { … … 420 418 } 421 419 422 [Association(Name="HeuristicLabAbstractRole_HeuristicLabAbstractRole", Storage="_HeuristicLabAbstractRole1", ThisKey="ParentRoleID", OtherKey="ID", IsForeignKey=true)] 423 public HeuristicLabAbstractRole HeuristicLabAbstractRole1 424 { 425 get 426 { 427 return this._HeuristicLabAbstractRole1.Entity; 428 } 429 set 430 { 431 HeuristicLabAbstractRole previousValue = this._HeuristicLabAbstractRole1.Entity; 420 [Association(Name="HeuristicLabRole_HeuristicLabRole", Storage="_HeuristicLabRole2", ThisKey="ID", OtherKey="ParentRoleID")] 421 public EntitySet<HeuristicLabRole> HeuristicLabRole2 422 { 423 get 424 { 425 return this._HeuristicLabRole2; 426 } 427 set 428 { 429 this._HeuristicLabRole2.Assign(value); 430 } 431 } 432 433 [Association(Name="HeuristicLabRole_HeuristicLabRole", Storage="_HeuristicLabRole1", ThisKey="ParentRoleID", OtherKey="ID", IsForeignKey=true)] 434 public HeuristicLabRole HeuristicLabRole1 435 { 436 get 437 { 438 return this._HeuristicLabRole1.Entity; 439 } 440 set 441 { 442 HeuristicLabRole previousValue = this._HeuristicLabRole1.Entity; 432 443 if (((previousValue != value) 433 || (this._HeuristicLab AbstractRole1.HasLoadedOrAssignedValue == false)))444 || (this._HeuristicLabRole1.HasLoadedOrAssignedValue == false))) 434 445 { 435 446 this.SendPropertyChanging(); 436 447 if ((previousValue != null)) 437 448 { 438 this._HeuristicLab AbstractRole1.Entity = null;439 previousValue.HeuristicLab AbstractRole2.Remove(this);440 } 441 this._HeuristicLab AbstractRole1.Entity = value;449 this._HeuristicLabRole1.Entity = null; 450 previousValue.HeuristicLabRole2.Remove(this); 451 } 452 this._HeuristicLabRole1.Entity = value; 442 453 if ((value != null)) 443 454 { 444 value.HeuristicLab AbstractRole2.Add(this);455 value.HeuristicLabRole2.Add(this); 445 456 this._parentRoleID = value.ID; 446 457 } 447 458 else 448 459 { 449 this._parentRoleID = default( long);450 } 451 this.SendPropertyChanged("HeuristicLab AbstractRole1");460 this._parentRoleID = default(Nullable<long>); 461 } 462 this.SendPropertyChanged("HeuristicLabRole1"); 452 463 } 453 464 } … … 474 485 } 475 486 476 private void attach_HeuristicLab AbstractRole2(HeuristicLabAbstractRole entity)487 private void attach_HeuristicLabUserRole(HeuristicLabUserRole entity) 477 488 { 478 489 this.SendPropertyChanging(); 479 entity.HeuristicLab AbstractRole1= this;480 } 481 482 private void detach_HeuristicLab AbstractRole2(HeuristicLabAbstractRole entity)490 entity.HeuristicLabRole = this; 491 } 492 493 private void detach_HeuristicLabUserRole(HeuristicLabUserRole entity) 483 494 { 484 495 this.SendPropertyChanging(); 485 entity.HeuristicLab AbstractRole1= null;486 } 487 488 private void attach_HeuristicLab UserRole(HeuristicLabUserRole entity)496 entity.HeuristicLabRole = null; 497 } 498 499 private void attach_HeuristicLabRole2(HeuristicLabRole entity) 489 500 { 490 501 this.SendPropertyChanging(); 491 entity.HeuristicLab AbstractRole= this;492 } 493 494 private void detach_HeuristicLab UserRole(HeuristicLabUserRole entity)502 entity.HeuristicLabRole1 = this; 503 } 504 505 private void detach_HeuristicLabRole2(HeuristicLabRole entity) 495 506 { 496 507 this.SendPropertyChanging(); 497 entity.HeuristicLabAbstractRole = null; 498 } 499 } 500 501 public partial class HeuristicLabPermissionRole : HeuristicLabAbstractRole 502 { 503 504 #region Extensibility Method Definitions 505 partial void OnLoaded(); 506 partial void OnValidate(System.Data.Linq.ChangeAction action); 507 partial void OnCreated(); 508 #endregion 509 510 public HeuristicLabPermissionRole() 511 { 512 OnCreated(); 513 } 514 } 515 516 public partial class HeuristicLabRole : HeuristicLabAbstractRole 517 { 518 519 #region Extensibility Method Definitions 520 partial void OnLoaded(); 521 partial void OnValidate(System.Data.Linq.ChangeAction action); 522 partial void OnCreated(); 523 #endregion 524 525 public HeuristicLabRole() 526 { 527 OnCreated(); 508 entity.HeuristicLabRole1 = null; 528 509 } 529 510 } … … 543 524 private EntityRef<HeuristicLabUser> _HeuristicLabUser; 544 525 545 private EntityRef<HeuristicLab AbstractRole> _HeuristicLabAbstractRole;526 private EntityRef<HeuristicLabRole> _HeuristicLabAbstractRole; 546 527 547 528 #region Extensibility Method Definitions … … 560 541 { 561 542 this._HeuristicLabUser = default(EntityRef<HeuristicLabUser>); 562 this._HeuristicLabAbstractRole = default(EntityRef<HeuristicLab AbstractRole>);543 this._HeuristicLabAbstractRole = default(EntityRef<HeuristicLabRole>); 563 544 OnCreated(); 564 545 } … … 666 647 } 667 648 668 [Association(Name="HeuristicLab AbstractRole_HeuristicLabUserRole", Storage="_HeuristicLabAbstractRole", ThisKey="HeuristicLabRoleID", OtherKey="ID", IsForeignKey=true)]669 public HeuristicLab AbstractRole HeuristicLabAbstractRole649 [Association(Name="HeuristicLabRole_HeuristicLabUserRole", Storage="_HeuristicLabAbstractRole", ThisKey="HeuristicLabRoleID", OtherKey="ID", IsForeignKey=true)] 650 public HeuristicLabRole HeuristicLabRole 670 651 { 671 652 get … … 675 656 set 676 657 { 677 HeuristicLab AbstractRole previousValue = this._HeuristicLabAbstractRole.Entity;658 HeuristicLabRole previousValue = this._HeuristicLabAbstractRole.Entity; 678 659 if (((previousValue != value) 679 660 || (this._HeuristicLabAbstractRole.HasLoadedOrAssignedValue == false))) … … 695 676 this._HeuristicLabRoleID = default(long); 696 677 } 697 this.SendPropertyChanged("HeuristicLab AbstractRole");678 this.SendPropertyChanged("HeuristicLabRole"); 698 679 } 699 680 } -
branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabRoleProvider.cs
r3943 r3951 1 1 using System; 2 2 using System.Web.Security; 3 using System.Linq; 3 4 using Persistence; 4 5 … … 51 52 52 53 public override bool RoleExists(string roleName) { 53 throw new NotImplementedException(); 54 55 Persistence.DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext(); 56 bool returnValue = (DatabaseUtil.createDataClassesDataContext().HeuristicLabRole.Count(r => r.RoleName == roleName) == 1); 57 db.Connection.Close(); 58 return returnValue; 59 54 60 } 55 61 } -
branches/HeuristicLab.Services.Authentication Prototype/UnitTests/HeuristicLabRoleProviderTest.cs
r3948 r3951 9 9 public class HeuristicLabRoleProviderTest : AbstractHeuristicLabTest { 10 10 private TestContext testContextInstance; 11 11 private const string TEST_ROLE_NAME = "testRole"; 12 12 /// <summary> 13 13 ///Gets or sets the test context which provides … … 69 69 70 70 /// <summary> 71 /// A test for RoleExists71 ///tests if the RoleExits method works --> test is done in a positiv and negativ way 72 72 ///</summary> 73 73 [TestMethod()] 74 74 public void RoleExistsTest() { 75 HeuristicLabRoleProvider target = new HeuristicLabRoleProvider(); // TODO: Initialize to an appropriate value 76 string roleName = string.Empty; // TODO: Initialize to an appropriate value 77 bool expected = false; // TODO: Initialize to an appropriate value 78 bool actual; 79 actual = target.RoleExists(roleName); 80 Assert.AreEqual(expected, actual); 81 Assert.Inconclusive("Verify the correctness of this test method."); 75 HeuristicLabRoleProvider target = new HeuristicLabRoleProvider(); 76 Persistence.HeuristicLabRole role = new Persistence.HeuristicLabRole(); 77 role.RoleName = TEST_ROLE_NAME; 78 Persistence.DataClassesDataContext db = Persistence.DatabaseUtil.createDataClassesDataContext(); 79 db.HeuristicLabRole.InsertOnSubmit((Persistence.HeuristicLabRole)role); 80 db.SubmitChanges(); 81 Assert.IsTrue(target.RoleExists(TEST_ROLE_NAME)); 82 Assert.IsFalse(target.RoleExists(TEST_ROLE_NAME + TEST_ROLE_NAME)); 82 83 } 83 84
Note: See TracChangeset
for help on using the changeset viewer.