Changeset 4789
- Timestamp:
- 11/14/10 10:51:43 (14 years ago)
- Location:
- branches/UserManagement
- Files:
-
- 14 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UserManagement/HeuristicLab.Authentication.sln
r4740 r4789 5 5 EndProject 6 6 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Authentication.DataTransfer", "HeuristicLab.Services.Authentication.DataTransfer\HeuristicLab.Services.Authentication.DataTransfer.csproj", "{AC44BDF4-AED7-4445-9A99-57B3237DBE88}" 7 EndProject8 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Authentication", "HeuristicLab.Services.Authentication\HeuristicLab.Services.Authentication.csproj", "{FF763830-EE9B-4FF7-9A55-4E2552E20C9A}"9 7 EndProject 10 8 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FD54DDCC-971C-4CB5-AD4B-B523388D6F01}" … … 15 13 EndProjectSection 16 14 EndProject 17 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Authentication.TestClient ", "HeuristicLab.Services.Authentication.TestClient\HeuristicLab.Services.Authentication.TestClient.csproj", "{C31A4169-0BD0-4969-A85B-49AA3B679047}"15 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Authentication.TestClient2", "HeuristicLab.Services.Authentication.TestClient2\HeuristicLab.Services.Authentication.TestClient2.csproj", "{EB40C828-D545-4DFE-9CE6-108FB03C6912}" 18 16 EndProject 19 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Authentication.TestClient2", "HeuristicLab.Services.Authentication.TestClient2\HeuristicLab.Services.Authentication.TestClient2.csproj", "{EB40C828-D545-4DFE-9CE6-108FB03C6912}" 17 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Authentication.ServiceClient", "HeuristicLab.Services.Authentication.ServiceClients\HeuristicLab.Services.Authentication.ServiceClient.csproj", "{8E698904-936D-4C7A-AB0D-6225778D2968}" 18 EndProject 19 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Authentication", "HeuristicLab.Services.Authentication\HeuristicLab.Services.Authentication.csproj", "{9FD3F26D-B051-4F4C-9C66-4A361EE357AD}" 20 20 EndProject 21 21 Global … … 52 52 {AC44BDF4-AED7-4445-9A99-57B3237DBE88}.Release|Mixed Platforms.Build.0 = Release|Any CPU 53 53 {AC44BDF4-AED7-4445-9A99-57B3237DBE88}.Release|x86.ActiveCfg = Release|Any CPU 54 {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU55 {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Debug|Any CPU.Build.0 = Debug|Any CPU56 {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU57 {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU58 {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Debug|x86.ActiveCfg = Debug|Any CPU59 {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Release|Any CPU.ActiveCfg = Release|Any CPU60 {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Release|Any CPU.Build.0 = Release|Any CPU61 {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU62 {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Release|Mixed Platforms.Build.0 = Release|Any CPU63 {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Release|x86.ActiveCfg = Release|Any CPU64 {C31A4169-0BD0-4969-A85B-49AA3B679047}.Debug|Any CPU.ActiveCfg = Debug|x8665 {C31A4169-0BD0-4969-A85B-49AA3B679047}.Debug|Mixed Platforms.ActiveCfg = Debug|x8666 {C31A4169-0BD0-4969-A85B-49AA3B679047}.Debug|Mixed Platforms.Build.0 = Debug|x8667 {C31A4169-0BD0-4969-A85B-49AA3B679047}.Debug|x86.ActiveCfg = Debug|x8668 {C31A4169-0BD0-4969-A85B-49AA3B679047}.Debug|x86.Build.0 = Debug|x8669 {C31A4169-0BD0-4969-A85B-49AA3B679047}.Release|Any CPU.ActiveCfg = Release|x8670 {C31A4169-0BD0-4969-A85B-49AA3B679047}.Release|Mixed Platforms.ActiveCfg = Release|x8671 {C31A4169-0BD0-4969-A85B-49AA3B679047}.Release|Mixed Platforms.Build.0 = Release|x8672 {C31A4169-0BD0-4969-A85B-49AA3B679047}.Release|x86.ActiveCfg = Release|x8673 {C31A4169-0BD0-4969-A85B-49AA3B679047}.Release|x86.Build.0 = Release|x8674 54 {EB40C828-D545-4DFE-9CE6-108FB03C6912}.Debug|Any CPU.ActiveCfg = Debug|x86 75 55 {EB40C828-D545-4DFE-9CE6-108FB03C6912}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 … … 82 62 {EB40C828-D545-4DFE-9CE6-108FB03C6912}.Release|x86.ActiveCfg = Release|x86 83 63 {EB40C828-D545-4DFE-9CE6-108FB03C6912}.Release|x86.Build.0 = Release|x86 64 {8E698904-936D-4C7A-AB0D-6225778D2968}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 65 {8E698904-936D-4C7A-AB0D-6225778D2968}.Debug|Any CPU.Build.0 = Debug|Any CPU 66 {8E698904-936D-4C7A-AB0D-6225778D2968}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 67 {8E698904-936D-4C7A-AB0D-6225778D2968}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 68 {8E698904-936D-4C7A-AB0D-6225778D2968}.Debug|x86.ActiveCfg = Debug|Any CPU 69 {8E698904-936D-4C7A-AB0D-6225778D2968}.Release|Any CPU.ActiveCfg = Release|Any CPU 70 {8E698904-936D-4C7A-AB0D-6225778D2968}.Release|Any CPU.Build.0 = Release|Any CPU 71 {8E698904-936D-4C7A-AB0D-6225778D2968}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 72 {8E698904-936D-4C7A-AB0D-6225778D2968}.Release|Mixed Platforms.Build.0 = Release|Any CPU 73 {8E698904-936D-4C7A-AB0D-6225778D2968}.Release|x86.ActiveCfg = Release|Any CPU 74 {9FD3F26D-B051-4F4C-9C66-4A361EE357AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 75 {9FD3F26D-B051-4F4C-9C66-4A361EE357AD}.Debug|Any CPU.Build.0 = Debug|Any CPU 76 {9FD3F26D-B051-4F4C-9C66-4A361EE357AD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 77 {9FD3F26D-B051-4F4C-9C66-4A361EE357AD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 78 {9FD3F26D-B051-4F4C-9C66-4A361EE357AD}.Debug|x86.ActiveCfg = Debug|Any CPU 79 {9FD3F26D-B051-4F4C-9C66-4A361EE357AD}.Release|Any CPU.ActiveCfg = Release|Any CPU 80 {9FD3F26D-B051-4F4C-9C66-4A361EE357AD}.Release|Any CPU.Build.0 = Release|Any CPU 81 {9FD3F26D-B051-4F4C-9C66-4A361EE357AD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 82 {9FD3F26D-B051-4F4C-9C66-4A361EE357AD}.Release|Mixed Platforms.Build.0 = Release|Any CPU 83 {9FD3F26D-B051-4F4C-9C66-4A361EE357AD}.Release|x86.ActiveCfg = Release|Any CPU 84 84 EndGlobalSection 85 85 GlobalSection(SolutionProperties) = preSolution -
branches/UserManagement/HeuristicLab.Services.Authentication.DataAccess/HeuristicLab.Services.Authentication.DataAccess.csproj
r4740 r4789 52 52 <DependentUpon>Settings.settings</DependentUpon> 53 53 </Compile> 54 <Compile Include="UserManagement.cs">55 <DependentUpon>UserManagement.dbml</DependentUpon>56 </Compile>57 54 <Compile Include="UserManagement.designer.cs"> 58 55 <AutoGen>True</AutoGen> -
branches/UserManagement/HeuristicLab.Services.Authentication.DataTransfer/Application.cs
r4740 r4789 9 9 [DataContract] 10 10 public class Application : NamedAuthItem { 11 //[DataMember]12 //public string LoweredApplicationName { get; set; }11 [DataMember] 12 public string LoweredApplicationName { get; set; } 13 13 [DataMember] 14 14 public string Description { get; set; } -
branches/UserManagement/HeuristicLab.Services.Authentication.DataTransfer/AuthItem.cs
r4741 r4789 5 5 [DataContract] 6 6 public abstract class AuthItem{ 7 8 7 9 [DataMember] 8 10 public System.Guid Id { get; set; } -
branches/UserManagement/HeuristicLab.Services.Authentication.DataTransfer/NamedAuthItem.cs
r4741 r4789 3 3 namespace HeuristicLab.Services.Authentication.DataTransfer { 4 4 [DataContract] 5 public abstract class NamedAuthItem : AuthItem { 5 public abstract class NamedAuthItem : AuthItem 6 { 6 7 [DataMember] 7 8 public string Name { get; set; } -
branches/UserManagement/HeuristicLab.Services.Authentication.DataTransfer/Role.cs
r4740 r4789 9 9 [DataContract] 10 10 public class Role : NamedAuthItem { 11 12 public Role() 13 { 14 Name = ""; 15 LoweredRoleName = ""; 16 } 17 11 18 [DataMember] 12 19 public Guid ApplicationId { get; set; } 13 //[DataMember]14 //public string LoweredRoleName { get; set; }20 [DataMember] 21 public string LoweredRoleName { get; set; } 15 22 [DataMember] 16 public string Desc iption { get; set; }23 public string Description { get; set; } 17 24 } 18 25 //[DataContract] … … 25 32 // [DataMember] 26 33 // public string RoleName { get; set; } 27 //[DataMember]28 //public string LoweredRoleName { get; set; }34 //[DataMember] 35 //public string LoweredRoleName { get; set; } 29 36 // [DataMember] 30 37 // public string Description { get; set; } -
branches/UserManagement/HeuristicLab.Services.Authentication.DataTransfer/User.cs
r4740 r4789 9 9 [DataContract] 10 10 public class User : NamedAuthItem { 11 12 public User() 13 { 14 Password = ""; 15 PasswordSalt = ""; 16 Name = ""; 17 CreateDate = DateTime.Now; 18 LastActivityDate = DateTime.Now; 19 LastLoginDate = DateTime.Now; 20 LastLockoutDate = DateTime.Now; 21 LastPasswordChangeDate = DateTime.Now; 22 } 23 11 24 // Member of Membership 12 25 [DataMember] -
branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/HeuristicLab.Services.Authentication.TestClient.csproj
r4740 r4789 64 64 <Name>HeuristicLab.Services.Authentication.DataTransfer</Name> 65 65 </ProjectReference> 66 <ProjectReference Include="..\HeuristicLab.Services.Authentication\HeuristicLab.Services.Authentication.csproj">67 <Project>{FF763830-EE9B-4FF7-9A55-4E2552E20C9A}</Project>68 <Name>HeuristicLab.Services.Authentication</Name>69 </ProjectReference>70 66 </ItemGroup> 71 67 <ItemGroup> -
branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/UserManagement.Designer.cs
r4740 r4789 49 49 this.userNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); 50 50 this.isAnonymousDataGridViewCheckBoxColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn(); 51 this.Membership = new System.Windows.Forms.DataGridViewTextBoxColumn();51 52 52 this.bsUsers = new System.Windows.Forms.BindingSource(this.components); 53 53 this.tcUser = new System.Windows.Forms.TabControl(); … … 290 290 this.dgvUsers.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { 291 291 this.userNameDataGridViewTextBoxColumn, 292 this.isAnonymousDataGridViewCheckBoxColumn, 293 this.Membership}); 292 this.isAnonymousDataGridViewCheckBoxColumn}); 294 293 this.dgvUsers.DataSource = this.bsUsers; 295 294 this.dgvUsers.Location = new System.Drawing.Point(3, 45); … … 311 310 this.isAnonymousDataGridViewCheckBoxColumn.HeaderText = "IsAnonymous"; 312 311 this.isAnonymousDataGridViewCheckBoxColumn.Name = "isAnonymousDataGridViewCheckBoxColumn"; 313 // 314 // Membership 315 // 316 this.Membership.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; 317 this.Membership.DataPropertyName = "Membership.Email"; 318 this.Membership.HeaderText = "EMail"; 319 this.Membership.Name = "Membership"; 320 this.Membership.Width = 58; 312 321 313 // 322 314 // bsUsers … … 356 348 this.tabPage3.Text = "Detail"; 357 349 this.tabPage3.UseVisualStyleBackColor = true; 358 // 359 // passwordSaltTextBox 360 // 361 this.passwordSaltTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsUser, "Membership.PasswordSalt", true)); 362 this.passwordSaltTextBox.Location = new System.Drawing.Point(134, 127); 363 this.passwordSaltTextBox.Name = "passwordSaltTextBox"; 364 this.passwordSaltTextBox.Size = new System.Drawing.Size(145, 20); 365 this.passwordSaltTextBox.TabIndex = 17; 350 366 351 // 367 352 // bsUser … … 369 354 this.bsUser.DataSource = typeof(HeuristicLab.Services.Authentication.DataTransfer.User); 370 355 // 371 // passwordQuestionTextBox 372 // 373 this.passwordQuestionTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsUser, "PasswordQuestion", true)); 374 this.passwordQuestionTextBox.Location = new System.Drawing.Point(134, 73); 375 this.passwordQuestionTextBox.Name = "passwordQuestionTextBox"; 376 this.passwordQuestionTextBox.Size = new System.Drawing.Size(145, 20); 377 this.passwordQuestionTextBox.TabIndex = 16; 356 378 357 // 379 358 // passwordTextBox … … 743 722 private System.Windows.Forms.DataGridViewTextBoxColumn userNameDataGridViewTextBoxColumn; 744 723 private System.Windows.Forms.DataGridViewCheckBoxColumn isAnonymousDataGridViewCheckBoxColumn; 745 private System.Windows.Forms.DataGridViewTextBoxColumn Membership; 724 746 725 } 747 726 } -
branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/UserManagement.cs
r4740 r4789 31 31 { 32 32 33 33 34 34 RefreshApplicationlist(); 35 35 } … … 61 61 { 62 62 // show detail 63 if(dgvUsers.SelectedRows.Count == 1){ 63 if (dgvUsers.SelectedRows.Count == 1) 64 { 64 65 User user = (User)dgvUsers.SelectedRows[0].DataBoundItem; 65 66 bsUser.DataSource = user; 66 bsUserRoles.DataSource = service.GetRolesForUser(user. UserId);67 bsUserRoles.DataSource = service.GetRolesForUser(user.Id); 67 68 tcUser.Enabled = false; 68 69 } … … 73 74 if (dgvRoles.SelectedRows.Count == 1) 74 75 { 75 Role role = (Role) 76 Role role = (Role)dgvRoles.SelectedRows[0].DataBoundItem; 76 77 bsRole.DataSource = role; 77 IEnumerable<User> _l = service.GetUsersInRole(role. RoleId);78 bsRoleUsers.DataSource = service.GetUsersInRole(role. RoleId);78 IEnumerable<User> _l = service.GetUsersInRole(role.Id); 79 bsRoleUsers.DataSource = service.GetUsersInRole(role.Id); 79 80 btnDeleteRole.Enabled = true; 80 81 tcRole.Enabled = true; … … 105 106 service.InsertUser(user); 106 107 RefreshUserlist(); 107 108 108 109 } 109 110 110 111 private void btnSaveRole_Click(object sender, EventArgs e) 111 112 { 112 Role role = (Role)bsRole.DataSource;113 role.ApplicationId = applicationId;114 service.InsertRole(role);115 tcRole.Enabled = false;116 RefreshRolelist();113 Role role = (Role)bsRole.DataSource; 114 role.ApplicationId = applicationId; 115 service.InsertRole(role); 116 tcRole.Enabled = false; 117 RefreshRolelist(); 117 118 } 118 119 119 120 120 121 121 122 private void btnAddUserToRole_Click(object sender, EventArgs e) … … 127 128 role.ApplicationId = applicationId; 128 129 user.ApplicationId = applicationId; 129 service.AddUserToRole(role. RoleId, user.UserId);130 RefreshRoleUserlist(role. RoleId);130 service.AddUserToRole(role.Id, user.Id); 131 RefreshRoleUserlist(role.Id); 131 132 } 132 133 } … … 137 138 { 138 139 Role role = (Role)dgvRoles.SelectedRows[0].DataBoundItem; 139 service.DeleteRole(role. RoleId);140 service.DeleteRole(role.Id); 140 141 RefreshRolelist(); 141 142 } … … 149 150 User user = (User)dgvRoleAssignedUsers.SelectedRows[0].DataBoundItem; 150 151 Role role = (Role)bsRole.DataSource; 151 152 service.RemoveUserFromRole(role. RoleId, user.UserId);153 RefreshRoleUserlist(role. RoleId);152 153 service.RemoveUserFromRole(role.Id, user.Id); 154 RefreshRoleUserlist(role.Id); 154 155 } 155 156 } … … 160 161 if (application != null) 161 162 { 162 applicationId = application. ApplicationId;163 applicationId = application.Id; 163 164 RefreshApplicationlist(); 164 165 } … … 173 174 if (user != null) 174 175 { 175 service.DeleteUser(user. UserId);176 service.DeleteUser(user.Id); 176 177 RefreshUserlist(); 177 178 } -
branches/UserManagement/HeuristicLab.Services.Authentication.TestClient2/HeuristicLab.Services.Authentication.TestClient2.csproj
r4740 r4789 37 37 <Reference Include="System" /> 38 38 <Reference Include="System.Core" /> 39 <Reference Include="System.Drawing" /> 40 <Reference Include="System.Windows.Forms" /> 39 41 <Reference Include="System.Xml.Linq" /> 40 42 <Reference Include="System.Data.DataSetExtensions" /> … … 46 48 <Compile Include="Program.cs" /> 47 49 <Compile Include="Properties\AssemblyInfo.cs" /> 50 <Compile Include="UserManagement.cs"> 51 <SubType>Form</SubType> 52 </Compile> 53 <Compile Include="UserManagement.Designer.cs"> 54 <DependentUpon>UserManagement.cs</DependentUpon> 55 </Compile> 48 56 </ItemGroup> 49 57 <ItemGroup> … … 53 61 </ProjectReference> 54 62 <ProjectReference Include="..\HeuristicLab.Services.Authentication\HeuristicLab.Services.Authentication.csproj"> 55 <Project>{ FF763830-EE9B-4FF7-9A55-4E2552E20C9A}</Project>63 <Project>{9FD3F26D-B051-4F4C-9C66-4A361EE357AD}</Project> 56 64 <Name>HeuristicLab.Services.Authentication</Name> 57 65 </ProjectReference> 66 </ItemGroup> 67 <ItemGroup> 68 <EmbeddedResource Include="UserManagement.resx"> 69 <DependentUpon>UserManagement.cs</DependentUpon> 70 </EmbeddedResource> 71 </ItemGroup> 72 <ItemGroup> 73 <None Include="Properties\DataSources\HeuristicLab.Services.Authentication.DataTransfer.Application.datasource" /> 74 <None Include="Properties\DataSources\HeuristicLab.Services.Authentication.DataTransfer.Role.datasource" /> 75 <None Include="Properties\DataSources\HeuristicLab.Services.Authentication.DataTransfer.User.datasource" /> 58 76 </ItemGroup> 59 77 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/UserManagement/HeuristicLab.Services.Authentication.TestClient2/Program.cs
r4740 r4789 5 5 using HeuristicLab.Services.Authentication.DataTransfer; 6 6 7 namespace HeuristicLab.Services.Authentication.TestClient2 { 8 class Program { 9 static void Main(string[] args) { 10 11 AuthenticationService auth = new AuthenticationService(); 12 13 14 Console.WriteLine("Find User with GUID: 0938331f-847e-4361-8ef0-a84e5a8b121c"); 15 Guid userguid = Guid.Parse("0938331f-847e-4361-8ef0-a84e5a8b121c"); 16 User user = auth.GetUser(userguid); 17 18 if (user != null) { 19 Console.WriteLine("Username of User: {0}", user.Name); 20 } else { 21 Console.WriteLine("User not found!"); 22 } 23 24 Console.ReadLine(); 25 26 27 7 namespace HeuristicLab.Services.Authentication.TestClient2 8 { 9 class Program 10 { 11 static void Main(string[] args) 12 { 13 System.Windows.Forms.Application.Run(new UserManagement()); 14 } 28 15 } 29 }30 16 }
Note: See TracChangeset
for help on using the changeset viewer.