Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/14/10 10:51:43 (14 years ago)
Author:
mjesner
Message:

#1196

Location:
branches/UserManagement
Files:
14 added
13 edited

Legend:

Unmodified
Added
Removed
  • branches/UserManagement/HeuristicLab.Authentication.sln

    r4740 r4789  
    55EndProject
    66Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Authentication.DataTransfer", "HeuristicLab.Services.Authentication.DataTransfer\HeuristicLab.Services.Authentication.DataTransfer.csproj", "{AC44BDF4-AED7-4445-9A99-57B3237DBE88}"
    7 EndProject
    8 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Authentication", "HeuristicLab.Services.Authentication\HeuristicLab.Services.Authentication.csproj", "{FF763830-EE9B-4FF7-9A55-4E2552E20C9A}"
    97EndProject
    108Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FD54DDCC-971C-4CB5-AD4B-B523388D6F01}"
     
    1513  EndProjectSection
    1614EndProject
    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}"
     15Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Authentication.TestClient2", "HeuristicLab.Services.Authentication.TestClient2\HeuristicLab.Services.Authentication.TestClient2.csproj", "{EB40C828-D545-4DFE-9CE6-108FB03C6912}"
    1816EndProject
    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}"
     17Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Authentication.ServiceClient", "HeuristicLab.Services.Authentication.ServiceClients\HeuristicLab.Services.Authentication.ServiceClient.csproj", "{8E698904-936D-4C7A-AB0D-6225778D2968}"
     18EndProject
     19Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Authentication", "HeuristicLab.Services.Authentication\HeuristicLab.Services.Authentication.csproj", "{9FD3F26D-B051-4F4C-9C66-4A361EE357AD}"
    2020EndProject
    2121Global
     
    5252    {AC44BDF4-AED7-4445-9A99-57B3237DBE88}.Release|Mixed Platforms.Build.0 = Release|Any CPU
    5353    {AC44BDF4-AED7-4445-9A99-57B3237DBE88}.Release|x86.ActiveCfg = Release|Any CPU
    54     {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    55     {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
    56     {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
    57     {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
    58     {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Debug|x86.ActiveCfg = Debug|Any CPU
    59     {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
    60     {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Release|Any CPU.Build.0 = Release|Any CPU
    61     {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
    62     {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
    63     {FF763830-EE9B-4FF7-9A55-4E2552E20C9A}.Release|x86.ActiveCfg = Release|Any CPU
    64     {C31A4169-0BD0-4969-A85B-49AA3B679047}.Debug|Any CPU.ActiveCfg = Debug|x86
    65     {C31A4169-0BD0-4969-A85B-49AA3B679047}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
    66     {C31A4169-0BD0-4969-A85B-49AA3B679047}.Debug|Mixed Platforms.Build.0 = Debug|x86
    67     {C31A4169-0BD0-4969-A85B-49AA3B679047}.Debug|x86.ActiveCfg = Debug|x86
    68     {C31A4169-0BD0-4969-A85B-49AA3B679047}.Debug|x86.Build.0 = Debug|x86
    69     {C31A4169-0BD0-4969-A85B-49AA3B679047}.Release|Any CPU.ActiveCfg = Release|x86
    70     {C31A4169-0BD0-4969-A85B-49AA3B679047}.Release|Mixed Platforms.ActiveCfg = Release|x86
    71     {C31A4169-0BD0-4969-A85B-49AA3B679047}.Release|Mixed Platforms.Build.0 = Release|x86
    72     {C31A4169-0BD0-4969-A85B-49AA3B679047}.Release|x86.ActiveCfg = Release|x86
    73     {C31A4169-0BD0-4969-A85B-49AA3B679047}.Release|x86.Build.0 = Release|x86
    7454    {EB40C828-D545-4DFE-9CE6-108FB03C6912}.Debug|Any CPU.ActiveCfg = Debug|x86
    7555    {EB40C828-D545-4DFE-9CE6-108FB03C6912}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
     
    8262    {EB40C828-D545-4DFE-9CE6-108FB03C6912}.Release|x86.ActiveCfg = Release|x86
    8363    {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
    8484  EndGlobalSection
    8585  GlobalSection(SolutionProperties) = preSolution
  • branches/UserManagement/HeuristicLab.Services.Authentication.DataAccess/HeuristicLab.Services.Authentication.DataAccess.csproj

    r4740 r4789  
    5252      <DependentUpon>Settings.settings</DependentUpon>
    5353    </Compile>
    54     <Compile Include="UserManagement.cs">
    55       <DependentUpon>UserManagement.dbml</DependentUpon>
    56     </Compile>
    5754    <Compile Include="UserManagement.designer.cs">
    5855      <AutoGen>True</AutoGen>
  • branches/UserManagement/HeuristicLab.Services.Authentication.DataTransfer/Application.cs

    r4740 r4789  
    99  [DataContract]
    1010  public class Application : NamedAuthItem {
    11     //[DataMember]
    12     //public string LoweredApplicationName { get; set; }
     11    [DataMember]
     12    public string LoweredApplicationName { get; set; }
    1313    [DataMember]
    1414    public string Description { get; set; }
  • branches/UserManagement/HeuristicLab.Services.Authentication.DataTransfer/AuthItem.cs

    r4741 r4789  
    55  [DataContract]
    66  public abstract class AuthItem{
     7
     8
    79    [DataMember]
    810    public System.Guid Id { get; set; }
  • branches/UserManagement/HeuristicLab.Services.Authentication.DataTransfer/NamedAuthItem.cs

    r4741 r4789  
    33namespace HeuristicLab.Services.Authentication.DataTransfer {
    44  [DataContract]
    5   public abstract class NamedAuthItem : AuthItem {
     5    public abstract class NamedAuthItem : AuthItem
     6    {
    67    [DataMember]
    78    public string Name { get; set; }
  • branches/UserManagement/HeuristicLab.Services.Authentication.DataTransfer/Role.cs

    r4740 r4789  
    99  [DataContract]
    1010  public class Role : NamedAuthItem {
     11
     12      public Role()
     13      {
     14          Name = "";
     15          LoweredRoleName = "";
     16      }
     17
    1118    [DataMember]
    1219    public Guid ApplicationId { get; set; }
    13     //[DataMember]
    14     //public string LoweredRoleName { get; set; }
     20   [DataMember]
     21    public string LoweredRoleName { get; set; }
    1522    [DataMember]
    16     public string Desciption { get; set; }
     23    public string Description { get; set; }
    1724  }
    1825    //[DataContract]
     
    2532    //    [DataMember]
    2633    //    public string RoleName { get; set; }
    27     //    [DataMember]
    28     //    public string LoweredRoleName { get; set; }
     34        //[DataMember]
     35        //public string LoweredRoleName { get; set; }
    2936    //    [DataMember]
    3037    //    public string Description { get; set; }
  • branches/UserManagement/HeuristicLab.Services.Authentication.DataTransfer/User.cs

    r4740 r4789  
    99  [DataContract]
    1010  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
    1124    // Member of Membership
    1225    [DataMember]
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/HeuristicLab.Services.Authentication.TestClient.csproj

    r4740 r4789  
    6464      <Name>HeuristicLab.Services.Authentication.DataTransfer</Name>
    6565    </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>
    7066  </ItemGroup>
    7167  <ItemGroup>
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/UserManagement.Designer.cs

    r4740 r4789  
    4949            this.userNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    5050            this.isAnonymousDataGridViewCheckBoxColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
    51             this.Membership = new System.Windows.Forms.DataGridViewTextBoxColumn();
     51           
    5252            this.bsUsers = new System.Windows.Forms.BindingSource(this.components);
    5353            this.tcUser = new System.Windows.Forms.TabControl();
     
    290290            this.dgvUsers.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
    291291            this.userNameDataGridViewTextBoxColumn,
    292             this.isAnonymousDataGridViewCheckBoxColumn,
    293             this.Membership});
     292            this.isAnonymousDataGridViewCheckBoxColumn});
    294293            this.dgvUsers.DataSource = this.bsUsers;
    295294            this.dgvUsers.Location = new System.Drawing.Point(3, 45);
     
    311310            this.isAnonymousDataGridViewCheckBoxColumn.HeaderText = "IsAnonymous";
    312311            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         
    321313            //
    322314            // bsUsers
     
    356348            this.tabPage3.Text = "Detail";
    357349            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           
    366351            //
    367352            // bsUser
     
    369354            this.bsUser.DataSource = typeof(HeuristicLab.Services.Authentication.DataTransfer.User);
    370355            //
    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
    378357            //
    379358            // passwordTextBox
     
    743722        private System.Windows.Forms.DataGridViewTextBoxColumn userNameDataGridViewTextBoxColumn;
    744723        private System.Windows.Forms.DataGridViewCheckBoxColumn isAnonymousDataGridViewCheckBoxColumn;
    745         private System.Windows.Forms.DataGridViewTextBoxColumn Membership;
     724
    746725    }
    747726}
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/UserManagement.cs

    r4740 r4789  
    3131            {
    3232
    33                
     33
    3434                RefreshApplicationlist();
    3535            }
     
    6161        {
    6262            // show detail
    63             if(dgvUsers.SelectedRows.Count == 1){
     63            if (dgvUsers.SelectedRows.Count == 1)
     64            {
    6465                User user = (User)dgvUsers.SelectedRows[0].DataBoundItem;
    6566                bsUser.DataSource = user;
    66                 bsUserRoles.DataSource = service.GetRolesForUser(user.UserId);
     67                bsUserRoles.DataSource = service.GetRolesForUser(user.Id);
    6768                tcUser.Enabled = false;
    6869            }
     
    7374            if (dgvRoles.SelectedRows.Count == 1)
    7475            {
    75                 Role role = (Role) dgvRoles.SelectedRows[0].DataBoundItem;
     76                Role role = (Role)dgvRoles.SelectedRows[0].DataBoundItem;
    7677                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);
    7980                btnDeleteRole.Enabled = true;
    8081                tcRole.Enabled = true;
     
    105106            service.InsertUser(user);
    106107            RefreshUserlist();
    107            
     108
    108109        }
    109110
    110111        private void btnSaveRole_Click(object sender, EventArgs e)
    111112        {
    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();
    117118        }
    118119
    119        
     120
    120121
    121122        private void btnAddUserToRole_Click(object sender, EventArgs e)
     
    127128                role.ApplicationId = applicationId;
    128129                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);
    131132            }
    132133        }
     
    137138            {
    138139                Role role = (Role)dgvRoles.SelectedRows[0].DataBoundItem;
    139                 service.DeleteRole(role.RoleId);
     140                service.DeleteRole(role.Id);
    140141                RefreshRolelist();
    141142            }
     
    149150                User user = (User)dgvRoleAssignedUsers.SelectedRows[0].DataBoundItem;
    150151                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);
    154155            }
    155156        }
     
    160161            if (application != null)
    161162            {
    162                 applicationId = application.ApplicationId;
     163                applicationId = application.Id;
    163164                RefreshApplicationlist();
    164165            }
     
    173174                if (user != null)
    174175                {
    175                     service.DeleteUser(user.UserId);
     176                    service.DeleteUser(user.Id);
    176177                    RefreshUserlist();
    177178                }
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient2/HeuristicLab.Services.Authentication.TestClient2.csproj

    r4740 r4789  
    3737    <Reference Include="System" />
    3838    <Reference Include="System.Core" />
     39    <Reference Include="System.Drawing" />
     40    <Reference Include="System.Windows.Forms" />
    3941    <Reference Include="System.Xml.Linq" />
    4042    <Reference Include="System.Data.DataSetExtensions" />
     
    4648    <Compile Include="Program.cs" />
    4749    <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>
    4856  </ItemGroup>
    4957  <ItemGroup>
     
    5361    </ProjectReference>
    5462    <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>
    5664      <Name>HeuristicLab.Services.Authentication</Name>
    5765    </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" />
    5876  </ItemGroup>
    5977  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient2/Program.cs

    r4740 r4789  
    55using HeuristicLab.Services.Authentication.DataTransfer;
    66
    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 
     7namespace 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        }
    2815    }
    29   }
    3016}
Note: See TracChangeset for help on using the changeset viewer.