Changeset 3962
- Timestamp:
- 06/26/10 11:58:16 (15 years ago)
- Location:
- branches/HeuristicLab.Services.Authentication Prototype
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml
r3951 r3962 11 11 <Column Name="Email" Modifier="Virtual" Type="System.String" CanBeNull="false" /> 12 12 <Column Name="Comment" Modifier="Virtual" Type="System.String" CanBeNull="false" /> 13 <Association Name="HeuristicLabUser_HeuristicLabUserRole" Member="HeuristicLabUserRole " ThisKey="ID" OtherKey="HeuristicLabUserID" Type="HeuristicLabUserRole" />13 <Association Name="HeuristicLabUser_HeuristicLabUserRole" Member="HeuristicLabUserRoles" Storage="_HeuristicLabUserRole" ThisKey="ID" OtherKey="HeuristicLabUserID" Type="HeuristicLabUserRole" /> 14 14 </Type> 15 15 </Table> … … 20 20 <Column Name="parentRoleID" Member="ParentRoleID" Storage="_parentRoleID" Type="System.Int64" CanBeNull="true" /> 21 21 <Column Name="IsPermission" Type="System.Boolean" CanBeNull="false" /> 22 <Association Name="HeuristicLabRole_HeuristicLab UserRole" Member="HeuristicLabUserRole" ThisKey="ID" OtherKey="HeuristicLabRoleID" Type="HeuristicLabUserRole" />23 <Association Name="HeuristicLabRole_HeuristicLab Role" Member="HeuristicLabRole2" ThisKey="ID" OtherKey="ParentRoleID" Type="HeuristicLabRole" />24 <Association Name="HeuristicLabRole_HeuristicLabRole" Member="HeuristicLabRole 1" ThisKey="ParentRoleID" OtherKey="ID" Type="HeuristicLabRole" IsForeignKey="true" />22 <Association Name="HeuristicLabRole_HeuristicLabRole" Member="HeuristicLabRoleChilds" Storage="_HeuristicLabRole2" ThisKey="ID" OtherKey="ParentRoleID" Type="HeuristicLabRole" /> 23 <Association Name="HeuristicLabRole_HeuristicLabUserRole" Member="HeuristicLabUserRoles" Storage="_HeuristicLabUserRole" ThisKey="ID" OtherKey="HeuristicLabRoleID" Type="HeuristicLabUserRole" /> 24 <Association Name="HeuristicLabRole_HeuristicLabRole" Member="HeuristicLabRoleParent" Storage="_HeuristicLabRole1" ThisKey="ParentRoleID" OtherKey="ID" Type="HeuristicLabRole" IsForeignKey="true" /> 25 25 </Type> 26 26 </Table> -
branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml.layout
r3951 r3962 28 28 </nodes> 29 29 </associationConnector> 30 <associationConnector edgePoints="[(5.19495923189603 : 2.70359537760417); (5.19495923189603 : 4.31814697265625); (2.625 : 4.31814697265625)]" fixedFrom=" Algorithm" fixedTo="Algorithm">30 <associationConnector edgePoints="[(5.19495923189603 : 2.70359537760417); (5.19495923189603 : 4.31814697265625); (2.625 : 4.31814697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 31 31 <AssociationMoniker Name="/DataClassesDataContext/HeuristicLabRole/HeuristicLabRole_HeuristicLabUserRole" /> 32 32 <nodes> -
branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.designer.cs
r3951 r3962 2 2 //------------------------------------------------------------------------------ 3 3 // <auto-generated> 4 // Dieser Code wurde von einem Tool generiert.5 // Laufzeitversion:2.0.50727.49274 // This code was generated by a tool. 5 // Runtime Version:2.0.50727.4927 6 6 // 7 // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn8 // der Code erneut generiert wird.7 // Changes to this file may cause incorrect behavior and will be lost if 8 // the code is regenerated. 9 9 // </auto-generated> 10 10 //------------------------------------------------------------------------------ … … 251 251 252 252 [Association(Name="HeuristicLabUser_HeuristicLabUserRole", Storage="_HeuristicLabUserRole", ThisKey="ID", OtherKey="HeuristicLabUserID")] 253 public EntitySet<HeuristicLabUserRole> HeuristicLabUserRole 253 public EntitySet<HeuristicLabUserRole> HeuristicLabUserRoles 254 254 { 255 255 get … … 310 310 private bool _IsPermission; 311 311 312 private EntitySet<HeuristicLabRole> _HeuristicLabRole2; 313 312 314 private EntitySet<HeuristicLabUserRole> _HeuristicLabUserRole; 313 314 private EntitySet<HeuristicLabRole> _HeuristicLabRole2;315 315 316 316 private EntityRef<HeuristicLabRole> _HeuristicLabRole1; … … 330 330 public HeuristicLabRole() 331 331 { 332 this._HeuristicLabRole2 = new EntitySet<HeuristicLabRole>(new Action<HeuristicLabRole>(this.attach_HeuristicLabRole2), new Action<HeuristicLabRole>(this.detach_HeuristicLabRole2)); 332 333 this._HeuristicLabUserRole = new EntitySet<HeuristicLabUserRole>(new Action<HeuristicLabUserRole>(this.attach_HeuristicLabUserRole), new Action<HeuristicLabUserRole>(this.detach_HeuristicLabUserRole)); 333 this._HeuristicLabRole2 = new EntitySet<HeuristicLabRole>(new Action<HeuristicLabRole>(this.attach_HeuristicLabRole2), new Action<HeuristicLabRole>(this.detach_HeuristicLabRole2));334 334 this._HeuristicLabRole1 = default(EntityRef<HeuristicLabRole>); 335 335 OnCreated(); … … 405 405 } 406 406 407 [Association(Name="HeuristicLabRole_HeuristicLabRole", Storage="_HeuristicLabRole2", ThisKey="ID", OtherKey="ParentRoleID")] 408 public EntitySet<HeuristicLabRole> HeuristicLabRoleChilds 409 { 410 get 411 { 412 return this._HeuristicLabRole2; 413 } 414 set 415 { 416 this._HeuristicLabRole2.Assign(value); 417 } 418 } 419 407 420 [Association(Name="HeuristicLabRole_HeuristicLabUserRole", Storage="_HeuristicLabUserRole", ThisKey="ID", OtherKey="HeuristicLabRoleID")] 408 public EntitySet<HeuristicLabUserRole> HeuristicLabUserRole 421 public EntitySet<HeuristicLabUserRole> HeuristicLabUserRoles 409 422 { 410 423 get … … 418 431 } 419 432 420 [Association(Name="HeuristicLabRole_HeuristicLabRole", Storage="_HeuristicLabRole2", ThisKey="ID", OtherKey="ParentRoleID")]421 public EntitySet<HeuristicLabRole> HeuristicLabRole2422 {423 get424 {425 return this._HeuristicLabRole2;426 }427 set428 {429 this._HeuristicLabRole2.Assign(value);430 }431 }432 433 433 [Association(Name="HeuristicLabRole_HeuristicLabRole", Storage="_HeuristicLabRole1", ThisKey="ParentRoleID", OtherKey="ID", IsForeignKey=true)] 434 public HeuristicLabRole HeuristicLabRole 1434 public HeuristicLabRole HeuristicLabRoleParent 435 435 { 436 436 get … … 448 448 { 449 449 this._HeuristicLabRole1.Entity = null; 450 previousValue.HeuristicLabRole 2.Remove(this);450 previousValue.HeuristicLabRoleChilds.Remove(this); 451 451 } 452 452 this._HeuristicLabRole1.Entity = value; 453 453 if ((value != null)) 454 454 { 455 value.HeuristicLabRole 2.Add(this);455 value.HeuristicLabRoleChilds.Add(this); 456 456 this._parentRoleID = value.ID; 457 457 } … … 460 460 this._parentRoleID = default(Nullable<long>); 461 461 } 462 this.SendPropertyChanged("HeuristicLabRole 1");462 this.SendPropertyChanged("HeuristicLabRoleParent"); 463 463 } 464 464 } … … 483 483 this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); 484 484 } 485 } 486 487 private void attach_HeuristicLabRole2(HeuristicLabRole entity) 488 { 489 this.SendPropertyChanging(); 490 entity.HeuristicLabRoleParent = this; 491 } 492 493 private void detach_HeuristicLabRole2(HeuristicLabRole entity) 494 { 495 this.SendPropertyChanging(); 496 entity.HeuristicLabRoleParent = null; 485 497 } 486 498 … … 495 507 this.SendPropertyChanging(); 496 508 entity.HeuristicLabRole = null; 497 }498 499 private void attach_HeuristicLabRole2(HeuristicLabRole entity)500 {501 this.SendPropertyChanging();502 entity.HeuristicLabRole1 = this;503 }504 505 private void detach_HeuristicLabRole2(HeuristicLabRole entity)506 {507 this.SendPropertyChanging();508 entity.HeuristicLabRole1 = null;509 509 } 510 510 } … … 630 630 { 631 631 this._HeuristicLabUser.Entity = null; 632 previousValue.HeuristicLabUserRole .Remove(this);632 previousValue.HeuristicLabUserRoles.Remove(this); 633 633 } 634 634 this._HeuristicLabUser.Entity = value; 635 635 if ((value != null)) 636 636 { 637 value.HeuristicLabUserRole .Add(this);637 value.HeuristicLabUserRoles.Add(this); 638 638 this._HeuristicLabUserID = value.ID; 639 639 } … … 664 664 { 665 665 this._HeuristicLabAbstractRole.Entity = null; 666 previousValue.HeuristicLabUserRole .Remove(this);666 previousValue.HeuristicLabUserRoles.Remove(this); 667 667 } 668 668 this._HeuristicLabAbstractRole.Entity = value; 669 669 if ((value != null)) 670 670 { 671 value.HeuristicLabUserRole .Add(this);671 value.HeuristicLabUserRoles.Add(this); 672 672 this._HeuristicLabRoleID = value.ID; 673 673 } -
branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabMembershipProvider.cs
r3961 r3962 185 185 // optionally delete related data 186 186 if (deleteAllRelatedData) { 187 db.HeuristicLabUserRole.DeleteAllOnSubmit<HeuristicLabUserRole>(u.HeuristicLabUserRole );187 db.HeuristicLabUserRole.DeleteAllOnSubmit<HeuristicLabUserRole>(u.HeuristicLabUserRoles); 188 188 } 189 189 -
branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabRoleProvider.cs
r3960 r3962 61 61 if (roleName != null && db.HeuristicLabRole.Count(r => r.RoleName == roleName) == 1) { 62 62 HeuristicLabRole role = db.HeuristicLabRole.Single(r => r.RoleName == roleName); 63 foreach (HeuristicLabUserRole userRole in role.HeuristicLabUserRole ) {63 foreach (HeuristicLabUserRole userRole in role.HeuristicLabUserRoles) { 64 64 if (userRole.HeuristicLabUser.UserName.Contains(usernameToMatch)) { 65 65 returnValue.Add(userRole.HeuristicLabUser.UserName); … … 88 88 89 89 Persistence.HeuristicLabUser user = context.HeuristicLabUsers.Single(u => u.UserName == username); 90 foreach (Persistence.HeuristicLabUserRole userRole in user.HeuristicLabUserRole ) {90 foreach (Persistence.HeuristicLabUserRole userRole in user.HeuristicLabUserRoles) { 91 91 roleList.Add(userRole.HeuristicLabRole.RoleName); 92 92 }
Note: See TracChangeset
for help on using the changeset viewer.