- Timestamp:
- 03/14/12 14:47:52 (13 years ago)
- Location:
- branches/ClientUserManagement
- Files:
-
- 22 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews/UserInformationDialog.Designer.cs
r7611 r7614 67 67 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 68 68 this.Text = "User Information"; 69 this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.UserInformationDialog_FormClosing); 69 70 this.ResumeLayout(false); 70 71 -
branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews/UserInformationDialog.cs
r7599 r7614 32 32 if (!DesignMode) { 33 33 refreshableLightweightUserInformationView.Content = AccessClient.Instance; 34 AccessClient.Instance.Refreshing += new System.EventHandler(Instance_Refreshing); 35 AccessClient.Instance.Refreshed += new System.EventHandler(Instance_Refreshed); 34 36 } 37 } 38 39 void Instance_Refreshed(object sender, System.EventArgs e) { 40 closeButton.Enabled = true; 41 } 42 43 void Instance_Refreshing(object sender, System.EventArgs e) { 44 closeButton.Enabled = false; 35 45 } 36 46 … … 38 48 Close(); 39 49 } 50 51 private void UserInformationDialog_FormClosing(object sender, FormClosingEventArgs e) { 52 AccessClient.Instance.Refreshing -= new System.EventHandler(Instance_Refreshing); 53 AccessClient.Instance.Refreshed -= new System.EventHandler(Instance_Refreshed); 54 } 40 55 } 41 56 } -
branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/HeuristicLab.Clients.Access-3.3.csproj
r7599 r7614 101 101 <Compile Include="ServiceClients\ClientGroup.cs" /> 102 102 <Compile Include="ServiceClients\Client.cs" /> 103 <Compile Include="ServiceClients\User.cs" /> 103 104 <Compile Include="ServiceClients\Role.cs" /> 104 105 <Compile Include="ServiceClients\Resource.cs" /> -
branches/ClientUserManagement/HeuristicLab.Services.Access.sln
r7555 r7614 21 21 EndProject 22 22 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Clients.Access.Views-3.3", "HeuristicLab.Clients.Access.Views\3.3\HeuristicLab.Clients.Access.Views-3.3.csproj", "{FE856595-64CD-46DA-9CD2-FFF3E6B0D4F2}" 23 EndProject 24 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Clients.Access.Administration-3.3", "HeuristicLab.Clients.Access.Administration\3.3\HeuristicLab.Clients.Access.Administration-3.3.csproj", "{C9CF6AE8-4637-4A75-9141-042F479B5D50}" 23 25 EndProject 24 26 Global … … 95 97 {FE856595-64CD-46DA-9CD2-FFF3E6B0D4F2}.Release|Mixed Platforms.Build.0 = Release|Any CPU 96 98 {FE856595-64CD-46DA-9CD2-FFF3E6B0D4F2}.Release|x86.ActiveCfg = Release|Any CPU 99 {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 100 {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Debug|Any CPU.Build.0 = Debug|Any CPU 101 {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 102 {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 103 {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Debug|x86.ActiveCfg = Debug|Any CPU 104 {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Release|Any CPU.ActiveCfg = Release|Any CPU 105 {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Release|Any CPU.Build.0 = Release|Any CPU 106 {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 107 {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Release|Mixed Platforms.Build.0 = Release|Any CPU 108 {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Release|x86.ActiveCfg = Release|Any CPU 97 109 EndGlobalSection 98 110 GlobalSection(SolutionProperties) = preSolution -
branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/AccessService.cs
r7612 r7614 143 143 144 144 public void DeleteClient(DT.Client client) { 145 roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);145 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 146 146 147 147 using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) { … … 200 200 201 201 public void DeleteClientGroup(DT.ClientGroup clientGroup) { 202 roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);202 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 203 203 204 204 using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) { … … 293 293 294 294 public void DeleteClientLog(DT.ClientLog log) { 295 roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);295 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 296 296 297 297 using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) { … … 324 324 } 325 325 326 if (aspUser == null || aspMembership == null) {326 if (aspUser != null || aspMembership != null) { 327 327 using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) { 328 328 var query = from u in context.UserGroupBases.OfType<DA.User>() … … 444 444 445 445 public IEnumerable<DT.User> GetAllUsers() { 446 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 447 446 448 List<Guid> accessUserGuids = null; 447 449 … … 456 458 457 459 public IEnumerable<DT.User> GetUsers(IEnumerable<Guid> ids) { 460 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 461 458 462 List<Guid> accessUserGuids = null; 459 463 … … 490 494 491 495 public DT.User AddUser(DT.User user) { 492 roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);496 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 493 497 494 498 DA.User accessUser; … … 537 541 538 542 public void DeleteUser(DT.User user) { 539 roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);543 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 540 544 541 545 if (user.Id != null && user.Id != Guid.Empty) { … … 561 565 562 566 public void UpdateUser(DT.User user) { 563 roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);567 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 564 568 565 569 AddUser(user); … … 567 571 568 572 public void AddUserToRole(DT.Role role, DT.User user) { 569 roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);573 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 570 574 571 575 //TODO: usernames and rolenames have to be unique! … … 577 581 578 582 public void RemoveUserFromRole(DT.Role role, DT.User user) { 579 roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);583 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 580 584 581 585 MembershipUser msUser = Membership.GetUser((object)user.Id); … … 594 598 595 599 public string ResetPassword(Guid userId) { 596 roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);600 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 597 601 598 602 MembershipUser msUser = Membership.GetUser(userId); … … 653 657 654 658 public void DeleteUserGroup(DT.UserGroup group) { 655 roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);659 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 656 660 657 661 using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) { … … 762 766 763 767 public DT.Role AddRole(DT.Role role) { 764 roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);768 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 765 769 766 770 Roles.CreateRole(role.Name); … … 769 773 770 774 public void DeleteRole(DT.Role role) { 771 roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);775 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 772 776 773 777 Roles.DeleteRole(role.Name); … … 800 804 801 805 public void RemoveRoleFromGroup(DT.UserGroup userGroup, DT.Role role) { 802 roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);806 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 803 807 804 808 Guid[] userIds; … … 830 834 831 835 public IEnumerable<DT.ClientError> GetClientErrors() { 832 roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);836 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 833 837 834 838 using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) { … … 840 844 841 845 public IEnumerable<DT.ClientError> GetLastClientErrors(DateTime startDate) { 842 roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);846 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 843 847 844 848 using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) { … … 851 855 852 856 public void DeleteError(DT.ClientError error) { 853 roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);857 RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator); 854 858 855 859 using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) { -
branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/Convert.cs
r7599 r7614 292 292 FullName = source.FullName, 293 293 UserName = aspUserSource.UserName, 294 //TODO: check if the roles and groups are include in source 294 295 Roles = roles.Select(x => Convert.ToDto(x)).ToArray(), 295 296 Groups = groups.Select(x => Convert.ToDto(x)).ToArray()
Note: See TracChangeset
for help on using the changeset viewer.