Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4726 for branches


Ignore:
Timestamp:
11/06/10 09:56:39 (13 years ago)
Author:
mjesner
Message:

#1196

Location:
branches/UserManagement
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/UserManagement/HeuristicLab.Services.Authentication.DataTransfer/User.cs

    r4647 r4726  
    1111    {
    1212
     13        public User()
     14        {
     15            Membership = new Membership();
     16        }
     17
    1318        [DataMember]
    1419        public Membership Membership { get; set; }
     20
    1521        [DataMember]
    1622        public string Email
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/HeuristicLab.Services.Authentication.TestClient.csproj

    r4647 r4726  
    7575  </ItemGroup>
    7676  <ItemGroup>
     77    <None Include="Properties\DataSources\HeuristicLab.Services.Authentication.DataTransfer.Application.datasource" />
    7778    <None Include="Properties\DataSources\HeuristicLab.Services.Authentication.DataTransfer.Role.datasource" />
    7879    <None Include="Properties\DataSources\HeuristicLab.Services.Authentication.DataTransfer.User.datasource" />
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/TestClient.cs

    r4647 r4726  
    2020            {
    2121
    22                 Console.WriteLine("Insert new application");
    23                 Application app1 = new Application() { ApplicationName="SPR Application", Description="SPR Application"};
    24                 app1 = auth.InsertApplication(app1);
    25 
    26                 if (app1 != null)
    27                 {
    28                     Console.WriteLine("okay");
    29                 }
    30                 else
    31                 {
    32                     Console.WriteLine("error");
    33                 }
    34                 Console.WriteLine("--------------------------");
    35 
    36                 Console.WriteLine("Insert user SPRTEST");
    37                 Membership membership = new Membership() { Email="aaa@bbb.com", Password="aaa", PasswordAnswer="bar", PasswordQuestion="foo?", PasswordSalt="aaa"};
    38                 User user1 = new User(){ UserName="SPRTEST", IsAnonymous=false, LastActivityDate=DateTime.Now, ApplicationId=app1.ApplicationId, Membership=membership};
    39                 auth.InsertUser(user1);
    40                 Console.WriteLine("--------------------------");
    41 
    42                 Console.WriteLine("Get user SPRTEST");
    43                 User user2 = auth.GetUser(app1.ApplicationId, "SPRTEST");
    44                 if (user2 != null)
    45                 {
    46                     Console.WriteLine("id=" + user2.UserId);
    47                 }
    48                 else
    49                 {
    50                     Console.WriteLine("not found!");
    51                 }
    52                 Console.WriteLine("--------------------------");
    53 
    54 
    55                 Console.WriteLine("Get user Einstein");
    56                 User user3 = auth.GetUser(app1.ApplicationId, "Einstein");
    57                 if (user3 != null)
    58                 {
    59                     Console.WriteLine("id=" + user2.UserId);
    60                 }
    61                 else
    62                 {
    63                     Console.WriteLine("not found!");
    64                 }
    65                 Console.WriteLine("--------------------------");
    66 
    67 
    68                 Console.WriteLine("Insert role Role1");
    69                 Role role1 = new Role() { RoleName = "Role1", Description = "first test role", ApplicationId = app1.ApplicationId };
    70 
    71                 if (auth.InsertRole(role1))
    72                 {
    73                     Console.WriteLine("okay");
    74                 }
    75                 else
    76                 {
    77                     Console.WriteLine("error");
    78                 }
    79                 Console.WriteLine("--------------------------");
    80 
    81                 Console.WriteLine("Get Role Role1");
    82                 Role role2 = auth.GetRole(app1.ApplicationId, "Role1");
    83                 if (role2 != null)
    84                 {
    85                     Console.WriteLine("id=" + role2.RoleId);
    86                 }
    87                 else
    88                 {
    89                     Console.WriteLine("not found!");
    90                 }
    91                 Console.WriteLine("--------------------------");
    92                 Console.WriteLine("Get Role Role2");
    93                 Role role3 = auth.GetRole(app1.ApplicationId, "Role2");
    94                 if (role3 != null)
    95                 {
    96                     Console.WriteLine("id=" + role3.RoleId);
    97                 }
    98                 else
    99                 {
    100                     Console.WriteLine("not found!");
    101                 }
    102                 Console.WriteLine("--------------------------");
     22                //Console.WriteLine("Insert new application");
     23                //Application app1 = new Application() { ApplicationName="SPR Application", Description="SPR Application"};
     24                //app1 = auth.InsertApplication(app1);
     25
     26                //if (app1 != null)
     27                //{
     28                //    Console.WriteLine("okay");
     29                //}
     30                //else
     31                //{
     32                //    Console.WriteLine("error");
     33                //}
     34                //Console.WriteLine("--------------------------");
     35
     36                //Console.WriteLine("Insert user SPRTEST");
     37                //Membership membership = new Membership() { Email="aaa@bbb.com", Password="aaa", PasswordAnswer="bar", PasswordQuestion="foo?", PasswordSalt="aaa"};
     38                //User user1 = new User(){ UserName="SPRTEST", IsAnonymous=false, LastActivityDate=DateTime.Now, ApplicationId=app1.ApplicationId, Membership=membership};
     39                //auth.InsertUser(user1);
     40                //Console.WriteLine("--------------------------");
     41
     42                //Console.WriteLine("Get user SPRTEST");
     43                //User user2 = auth.GetUser(app1.ApplicationId, "SPRTEST");
     44                //if (user2 != null)
     45                //{
     46                //    Console.WriteLine("id=" + user2.UserId);
     47                //}
     48                //else
     49                //{
     50                //    Console.WriteLine("not found!");
     51                //}
     52                //Console.WriteLine("--------------------------");
     53
     54
     55                //Console.WriteLine("Get user Einstein");
     56                //User user3 = auth.GetUser(app1.ApplicationId, "Einstein");
     57                //if (user3 != null)
     58                //{
     59                //    Console.WriteLine("id=" + user2.UserId);
     60                //}
     61                //else
     62                //{
     63                //    Console.WriteLine("not found!");
     64                //}
     65                //Console.WriteLine("--------------------------");
     66
     67
     68                //Console.WriteLine("Insert role Role1");
     69                //Role role1 = new Role() { RoleName = "Role1", Description = "first test role", ApplicationId = app1.ApplicationId };
     70
     71                //if (auth.InsertRole(role1))
     72                //{
     73                //    Console.WriteLine("okay");
     74                //}
     75                //else
     76                //{
     77                //    Console.WriteLine("error");
     78                //}
     79                //Console.WriteLine("--------------------------");
     80
     81                //Console.WriteLine("Get Role Role1");
     82                //Role role2 = auth.GetRole(app1.ApplicationId, "Role1");
     83                //if (role2 != null)
     84                //{
     85                //    Console.WriteLine("id=" + role2.RoleId);
     86                //}
     87                //else
     88                //{
     89                //    Console.WriteLine("not found!");
     90                //}
     91                //Console.WriteLine("--------------------------");
     92                //Console.WriteLine("Get Role Role2");
     93                //Role role3 = auth.GetRole(app1.ApplicationId, "Role2");
     94                //if (role3 != null)
     95                //{
     96                //    Console.WriteLine("id=" + role3.RoleId);
     97                //}
     98                //else
     99                //{
     100                //    Console.WriteLine("not found!");
     101                //}
     102                //Console.WriteLine("--------------------------");
    103103
    104104               
    105                 Console.WriteLine("GetRoles");
    106                 IEnumerable<Role> list3 = auth.GetRoles(app1.ApplicationId);
    107 
    108                 foreach (Role role in list3)
    109                 {
    110                     Console.WriteLine(role.RoleName);
    111                 }
    112                 Console.WriteLine("--------------------------");
    113                 Console.WriteLine("Is User SPRTEST In Role1");
    114                 if (auth.IsUserInRole(role2.RoleId, user2.UserId))
    115                 {
    116                     Console.WriteLine("true");
    117                 }
    118                 else
    119                 {
    120                     Console.WriteLine("false");
    121                 }
    122                 Console.WriteLine("--------------------------");
    123 
    124 
    125 
    126                 Console.WriteLine("Add User SPRTEST To Role1");
    127                 if (auth.AddUserToRole(role2.RoleId, user2.UserId))
    128                 {
    129                     Console.WriteLine("okay");
    130                 }
    131                 else
    132                 {
    133                     Console.WriteLine("error");
    134                 }
    135                 Console.WriteLine("--------------------------");
    136 
    137                 Console.WriteLine("Is User SPRTEST In Role1");
    138                 if (auth.IsUserInRole(role2.RoleId, user2.UserId))
    139                 {
    140                     Console.WriteLine("true");
    141                 }
    142                 else
    143                 {
    144                     Console.WriteLine("false");
    145                 }
    146                 Console.WriteLine("--------------------------");
    147 
    148                 Console.WriteLine("Add User SPRTEST To Role2");
    149                 if (role3 != null && auth.AddUserToRole(role3.RoleId, user2.UserId))
    150                 {
    151                     Console.WriteLine("okay");
    152                 }
    153                 else
    154                 {
    155                     Console.WriteLine("error");
    156                 }
    157                 Console.WriteLine("--------------------------");
     105                //Console.WriteLine("GetRoles");
     106                //IEnumerable<Role> list3 = auth.GetRoles(app1.ApplicationId);
     107
     108                //foreach (Role role in list3)
     109                //{
     110                //    Console.WriteLine(role.RoleName);
     111                //}
     112                //Console.WriteLine("--------------------------");
     113                //Console.WriteLine("Is User SPRTEST In Role1");
     114                //if (auth.IsUserInRole(role2.RoleId, user2.UserId))
     115                //{
     116                //    Console.WriteLine("true");
     117                //}
     118                //else
     119                //{
     120                //    Console.WriteLine("false");
     121                //}
     122                //Console.WriteLine("--------------------------");
     123
     124
     125
     126                //Console.WriteLine("Add User SPRTEST To Role1");
     127                //if (auth.AddUserToRole(role2.RoleId, user2.UserId))
     128                //{
     129                //    Console.WriteLine("okay");
     130                //}
     131                //else
     132                //{
     133                //    Console.WriteLine("error");
     134                //}
     135                //Console.WriteLine("--------------------------");
     136
     137                //Console.WriteLine("Is User SPRTEST In Role1");
     138                //if (auth.IsUserInRole(role2.RoleId, user2.UserId))
     139                //{
     140                //    Console.WriteLine("true");
     141                //}
     142                //else
     143                //{
     144                //    Console.WriteLine("false");
     145                //}
     146                //Console.WriteLine("--------------------------");
     147
     148                //Console.WriteLine("Add User SPRTEST To Role2");
     149                //if (role3 != null && auth.AddUserToRole(role3.RoleId, user2.UserId))
     150                //{
     151                //    Console.WriteLine("okay");
     152                //}
     153                //else
     154                //{
     155                //    Console.WriteLine("error");
     156                //}
     157                //Console.WriteLine("--------------------------");
    158158 
    159159
    160160               
    161                 IEnumerable<User> list1 = auth.GetUsers(app1.ApplicationId);
    162                 Console.WriteLine("Get Users");
    163                 foreach (var item in list1)
    164                 {
    165                     Console.WriteLine( item.UserName);
    166                 }
    167 
    168                 Console.WriteLine("--------------------------");
    169                 User user4 = auth.GetUser(app1.ApplicationId, "SPRTEST");
    170                 if (user4 != null)
    171                 {
    172                     IEnumerable<Role> roles = auth.GetRolesForUser(user4.UserId);
    173                     Console.WriteLine("Get Roles for user SPRTEST");
    174                     foreach (Role r in roles)
    175                     {
    176                         Console.WriteLine(r.RoleName);
    177                     }
    178                 }
    179                
    180                 Console.WriteLine("--------------------------");
    181                 Console.WriteLine("Remove SPRTEST From Role1");
    182                 if (auth.RemoveUserFromRole(role2.RoleId, user4.UserId))
    183                 {
    184                     Console.WriteLine("okay");
    185                 }
    186                 else
    187                 {
    188                     Console.WriteLine("error");
    189                 }
    190 
    191                 Console.WriteLine("--------------------------");
    192                 User user5 = auth.GetUser(app1.ApplicationId, "SPRTEST");
    193                 if (user5 != null)
    194                 {
    195                     IEnumerable<Role> roles = auth.GetRolesForUser(user5.UserId);
    196                     Console.WriteLine("Get Roles for user SPRTEST");
    197                     foreach (Role r in roles)
    198                     {
    199                         Console.WriteLine(r.RoleName);
    200                     }
    201                 }
    202 
    203                 Console.WriteLine("--------------------------");
    204                 Console.WriteLine("Delete User SPRTEST");
    205                 if (auth.DeleteUser(user4.UserId))
    206                 {
    207                     Console.WriteLine("okay");
    208                 }
    209                 else
    210                 {
    211                     Console.WriteLine("error");
    212                 }
    213                 Console.WriteLine("--------------------------");
    214 
    215                 IEnumerable<User> list2 = auth.GetUsers(app1.ApplicationId);
    216                 Console.WriteLine("Get Users");
    217                 foreach (var item in list2)
    218                 {
    219                     Console.WriteLine(item.UserName);
    220                 }
    221 
    222                 Console.WriteLine("--------------------------");
    223                 Console.WriteLine("Update user SPRTEST");
    224                 User user6 = auth.GetUser(app1.ApplicationId,"SPRTEST");
    225 
    226                 if (user6 != null)
    227                 {
    228                     user6.LoweredUserName = "new lowered name";
    229                     user6.Membership.Email = "new email";
    230                     auth.UpdateUser(user6);
    231                 }
     161                //IEnumerable<User> list1 = auth.GetUsers(app1.ApplicationId);
     162                //Console.WriteLine("Get Users");
     163                //foreach (var item in list1)
     164                //{
     165                //    Console.WriteLine( item.UserName);
     166                //}
     167
     168                //Console.WriteLine("--------------------------");
     169                //User user4 = auth.GetUser(app1.ApplicationId, "SPRTEST");
     170                //if (user4 != null)
     171                //{
     172                //    IEnumerable<Role> roles = auth.GetRolesForUser(user4.UserId);
     173                //    Console.WriteLine("Get Roles for user SPRTEST");
     174                //    foreach (Role r in roles)
     175                //    {
     176                //        Console.WriteLine(r.RoleName);
     177                //    }
     178                //}
     179                ///*
     180                //Console.WriteLine("--------------------------");
     181                //Console.WriteLine("Remove SPRTEST From Role1");
     182                //if (auth.RemoveUserFromRole(role2.RoleId, user4.UserId))
     183                //{
     184                //    Console.WriteLine("okay");
     185                //}
     186                //else
     187                //{
     188                //    Console.WriteLine("error");
     189                //}
     190                //*/
     191                //Console.WriteLine("--------------------------");
     192                //User user5 = auth.GetUser(app1.ApplicationId, "SPRTEST");
     193                //if (user5 != null)
     194                //{
     195                //    IEnumerable<Role> roles = auth.GetRolesForUser(user5.UserId);
     196                //    Console.WriteLine("Get Roles for user SPRTEST");
     197                //    foreach (Role r in roles)
     198                //    {
     199                //        Console.WriteLine(r.RoleName);
     200                //    }
     201                //}
     202                ///*
     203                //Console.WriteLine("--------------------------");
     204                //Console.WriteLine("Delete User SPRTEST");
     205                //if (auth.DeleteUser(user4.UserId))
     206                //{
     207                //    Console.WriteLine("okay");
     208                //}
     209                //else
     210                //{
     211                //    Console.WriteLine("error");
     212                //}
     213                //Console.WriteLine("--------------------------");
     214                //*/
     215                //IEnumerable<User> list2 = auth.GetUsers(app1.ApplicationId);
     216                //Console.WriteLine("Get Users");
     217                //foreach (var item in list2)
     218                //{
     219                //    Console.WriteLine(item.UserName);
     220                //}
     221
     222                //Console.WriteLine("--------------------------");
     223                //Console.WriteLine("Update user SPRTEST");
     224                //User user6 = auth.GetUser(app1.ApplicationId,"SPRTEST");
     225
     226                //if (user6 != null)
     227                //{
     228                //    user6.LoweredUserName = "new lowered name";
     229                //    user6.Membership.Email = "new email";
     230                //    auth.UpdateUser(user6);
     231                //}
    232232
    233233
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/UserManagement.Designer.cs

    r4647 r4726  
    3030        {
    3131            this.components = new System.ComponentModel.Container();
    32             System.Windows.Forms.Label isAnonymousLabel;
     32            System.Windows.Forms.Label roleNameLabel;
     33            System.Windows.Forms.Label descriptionLabel;
     34            System.Windows.Forms.Label emailLabel;
     35            System.Windows.Forms.Label userNameLabel;
    3336            System.Windows.Forms.Label passwordLabel;
    34             System.Windows.Forms.Label passwordAnswerLabel;
    3537            System.Windows.Forms.Label passwordQuestionLabel;
    3638            System.Windows.Forms.Label passwordSaltLabel;
    37             System.Windows.Forms.Label emailLabel;
    38             System.Windows.Forms.Label roleNameLabel;
    39             this.bsUsers = new System.Windows.Forms.BindingSource(this.components);
    40             this.bsRoles = new System.Windows.Forms.BindingSource(this.components);
    4139            this.scMain = new System.Windows.Forms.SplitContainer();
     40            this.panel1 = new System.Windows.Forms.Panel();
     41            this.cbxApplication = new System.Windows.Forms.ComboBox();
     42            this.bsApplications = new System.Windows.Forms.BindingSource(this.components);
     43            this.label1 = new System.Windows.Forms.Label();
    4244            this.tabControl1 = new System.Windows.Forms.TabControl();
    4345            this.tabPage1 = new System.Windows.Forms.TabPage();
     46            this.btnDeleteUser = new System.Windows.Forms.Button();
     47            this.btnNewUser = new System.Windows.Forms.Button();
     48            this.dgvUsers = new System.Windows.Forms.DataGridView();
     49            this.bsUsers = new System.Windows.Forms.BindingSource(this.components);
     50            this.tcUser = new System.Windows.Forms.TabControl();
     51            this.tabPage3 = new System.Windows.Forms.TabPage();
     52            this.passwordSaltTextBox = new System.Windows.Forms.TextBox();
     53            this.bsUser = new System.Windows.Forms.BindingSource(this.components);
     54            this.passwordQuestionTextBox = new System.Windows.Forms.TextBox();
     55            this.passwordTextBox = new System.Windows.Forms.TextBox();
     56            this.userNameTextBox = new System.Windows.Forms.TextBox();
     57            this.emailTextBox = new System.Windows.Forms.TextBox();
     58            this.btnSaveUser = new System.Windows.Forms.Button();
    4459            this.tabPage2 = new System.Windows.Forms.TabPage();
    45             this.tabControl2 = new System.Windows.Forms.TabControl();
    46             this.tabPage4 = new System.Windows.Forms.TabPage();
    47             this.tabControl3 = new System.Windows.Forms.TabControl();
    48             this.tabPage5 = new System.Windows.Forms.TabPage();
    49             this.tabPage6 = new System.Windows.Forms.TabPage();
    50             this.dgvUsers = new System.Windows.Forms.DataGridView();
     60            this.btnDeleteRole = new System.Windows.Forms.Button();
     61            this.btnNewRole = new System.Windows.Forms.Button();
    5162            this.dgvRoles = new System.Windows.Forms.DataGridView();
    52             this.panel1 = new System.Windows.Forms.Panel();
    53             this.label1 = new System.Windows.Forms.Label();
    54             this.membershipDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    55             this.applicationIdDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    56             this.userIdDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    57             this.userNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    58             this.loweredUserNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    59             this.mobileAliasDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    60             this.isAnonymousDataGridViewCheckBoxColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
    61             this.lastActivityDateDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    62             this.tabPage3 = new System.Windows.Forms.TabPage();
    63             this.isAnonymousCheckBox = new System.Windows.Forms.CheckBox();
    64             this.passwordTextBox = new System.Windows.Forms.TextBox();
    65             this.passwordAnswerTextBox = new System.Windows.Forms.TextBox();
    66             this.passwordQuestionTextBox = new System.Windows.Forms.TextBox();
    67             this.passwordSaltTextBox = new System.Windows.Forms.TextBox();
    68             this.emailTextBox = new System.Windows.Forms.TextBox();
    69             this.dataGridView1 = new System.Windows.Forms.DataGridView();
    70             this.roleNameTextBox = new System.Windows.Forms.TextBox();
    71             this.dataGridView2 = new System.Windows.Forms.DataGridView();
    72             this.roleIdDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    7363            this.roleNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    7464            this.loweredRoleNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    7565            this.descriptionDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    76             isAnonymousLabel = new System.Windows.Forms.Label();
     66            this.bsRoles = new System.Windows.Forms.BindingSource(this.components);
     67            this.tcRole = new System.Windows.Forms.TabControl();
     68            this.tpRoleDetail = new System.Windows.Forms.TabPage();
     69            this.descriptionTextBox = new System.Windows.Forms.TextBox();
     70            this.bsRole = new System.Windows.Forms.BindingSource(this.components);
     71            this.btnSaveRole = new System.Windows.Forms.Button();
     72            this.roleNameTextBox = new System.Windows.Forms.TextBox();
     73            this.tabPage6 = new System.Windows.Forms.TabPage();
     74            this.label3 = new System.Windows.Forms.Label();
     75            this.label2 = new System.Windows.Forms.Label();
     76            this.dgvRoleAssignedUsers = new System.Windows.Forms.DataGridView();
     77            this.userNameDataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     78            this.bsRoleUsers = new System.Windows.Forms.BindingSource(this.components);
     79            this.btnAddUserToRole = new System.Windows.Forms.Button();
     80            this.btnRemoveUserFromRole = new System.Windows.Forms.Button();
     81            this.dgvRoleAvailableUsers = new System.Windows.Forms.DataGridView();
     82            this.userNameDataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     83            this.bsUserRoles = new System.Windows.Forms.BindingSource(this.components);
     84            this.Membership = new System.Windows.Forms.DataGridViewTextBoxColumn();
     85            this.isAnonymousDataGridViewCheckBoxColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
     86            this.userNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
     87            roleNameLabel = new System.Windows.Forms.Label();
     88            descriptionLabel = new System.Windows.Forms.Label();
     89            emailLabel = new System.Windows.Forms.Label();
     90            userNameLabel = new System.Windows.Forms.Label();
    7791            passwordLabel = new System.Windows.Forms.Label();
    78             passwordAnswerLabel = new System.Windows.Forms.Label();
    7992            passwordQuestionLabel = new System.Windows.Forms.Label();
    8093            passwordSaltLabel = new System.Windows.Forms.Label();
    81             emailLabel = new System.Windows.Forms.Label();
    82             roleNameLabel = new System.Windows.Forms.Label();
    83             ((System.ComponentModel.ISupportInitialize)(this.bsUsers)).BeginInit();
    84             ((System.ComponentModel.ISupportInitialize)(this.bsRoles)).BeginInit();
    8594            ((System.ComponentModel.ISupportInitialize)(this.scMain)).BeginInit();
    8695            this.scMain.Panel1.SuspendLayout();
    8796            this.scMain.Panel2.SuspendLayout();
    8897            this.scMain.SuspendLayout();
     98            this.panel1.SuspendLayout();
     99            ((System.ComponentModel.ISupportInitialize)(this.bsApplications)).BeginInit();
    89100            this.tabControl1.SuspendLayout();
    90101            this.tabPage1.SuspendLayout();
     102            ((System.ComponentModel.ISupportInitialize)(this.dgvUsers)).BeginInit();
     103            ((System.ComponentModel.ISupportInitialize)(this.bsUsers)).BeginInit();
     104            this.tcUser.SuspendLayout();
     105            this.tabPage3.SuspendLayout();
     106            ((System.ComponentModel.ISupportInitialize)(this.bsUser)).BeginInit();
    91107            this.tabPage2.SuspendLayout();
    92             this.tabControl2.SuspendLayout();
    93             this.tabPage4.SuspendLayout();
    94             this.tabControl3.SuspendLayout();
    95             this.tabPage5.SuspendLayout();
     108            ((System.ComponentModel.ISupportInitialize)(this.dgvRoles)).BeginInit();
     109            ((System.ComponentModel.ISupportInitialize)(this.bsRoles)).BeginInit();
     110            this.tcRole.SuspendLayout();
     111            this.tpRoleDetail.SuspendLayout();
     112            ((System.ComponentModel.ISupportInitialize)(this.bsRole)).BeginInit();
    96113            this.tabPage6.SuspendLayout();
    97             ((System.ComponentModel.ISupportInitialize)(this.dgvUsers)).BeginInit();
    98             ((System.ComponentModel.ISupportInitialize)(this.dgvRoles)).BeginInit();
    99             this.panel1.SuspendLayout();
    100             this.tabPage3.SuspendLayout();
    101             ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
    102             ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit();
     114            ((System.ComponentModel.ISupportInitialize)(this.dgvRoleAssignedUsers)).BeginInit();
     115            ((System.ComponentModel.ISupportInitialize)(this.bsRoleUsers)).BeginInit();
     116            ((System.ComponentModel.ISupportInitialize)(this.dgvRoleAvailableUsers)).BeginInit();
     117            ((System.ComponentModel.ISupportInitialize)(this.bsUserRoles)).BeginInit();
    103118            this.SuspendLayout();
    104119            //
    105             // bsUsers
    106             //
    107             this.bsUsers.DataSource = typeof(HeuristicLab.Services.Authentication.DataTransfer.User);
    108             //
    109             // bsRoles
    110             //
    111             this.bsRoles.DataSource = typeof(HeuristicLab.Services.Authentication.DataTransfer.Role);
     120            // roleNameLabel
     121            //
     122            roleNameLabel.AutoSize = true;
     123            roleNameLabel.Location = new System.Drawing.Point(12, 22);
     124            roleNameLabel.Name = "roleNameLabel";
     125            roleNameLabel.Size = new System.Drawing.Size(63, 13);
     126            roleNameLabel.TabIndex = 0;
     127            roleNameLabel.Text = "Role Name:";
     128            //
     129            // descriptionLabel
     130            //
     131            descriptionLabel.AutoSize = true;
     132            descriptionLabel.Location = new System.Drawing.Point(13, 57);
     133            descriptionLabel.Name = "descriptionLabel";
     134            descriptionLabel.Size = new System.Drawing.Size(63, 13);
     135            descriptionLabel.TabIndex = 3;
     136            descriptionLabel.Text = "Description:";
     137            //
     138            // emailLabel
     139            //
     140            emailLabel.AutoSize = true;
     141            emailLabel.Location = new System.Drawing.Point(25, 102);
     142            emailLabel.Name = "emailLabel";
     143            emailLabel.Size = new System.Drawing.Size(35, 13);
     144            emailLabel.TabIndex = 12;
     145            emailLabel.Text = "Email:";
     146            //
     147            // userNameLabel
     148            //
     149            userNameLabel.AutoSize = true;
     150            userNameLabel.Location = new System.Drawing.Point(25, 24);
     151            userNameLabel.Name = "userNameLabel";
     152            userNameLabel.Size = new System.Drawing.Size(63, 13);
     153            userNameLabel.TabIndex = 13;
     154            userNameLabel.Text = "User Name:";
     155            //
     156            // passwordLabel
     157            //
     158            passwordLabel.AutoSize = true;
     159            passwordLabel.Location = new System.Drawing.Point(25, 47);
     160            passwordLabel.Name = "passwordLabel";
     161            passwordLabel.Size = new System.Drawing.Size(56, 13);
     162            passwordLabel.TabIndex = 14;
     163            passwordLabel.Text = "Password:";
     164            //
     165            // passwordQuestionLabel
     166            //
     167            passwordQuestionLabel.AutoSize = true;
     168            passwordQuestionLabel.Location = new System.Drawing.Point(25, 76);
     169            passwordQuestionLabel.Name = "passwordQuestionLabel";
     170            passwordQuestionLabel.Size = new System.Drawing.Size(101, 13);
     171            passwordQuestionLabel.TabIndex = 15;
     172            passwordQuestionLabel.Text = "Password Question:";
     173            //
     174            // passwordSaltLabel
     175            //
     176            passwordSaltLabel.AutoSize = true;
     177            passwordSaltLabel.Location = new System.Drawing.Point(25, 130);
     178            passwordSaltLabel.Name = "passwordSaltLabel";
     179            passwordSaltLabel.Size = new System.Drawing.Size(77, 13);
     180            passwordSaltLabel.TabIndex = 16;
     181            passwordSaltLabel.Text = "Password Salt:";
    112182            //
    113183            // scMain
     
    125195            //
    126196            this.scMain.Panel2.Controls.Add(this.tabControl1);
    127             this.scMain.Size = new System.Drawing.Size(1100, 556);
    128             this.scMain.SplitterDistance = 47;
     197            this.scMain.Size = new System.Drawing.Size(1100, 610);
     198            this.scMain.SplitterDistance = 51;
    129199            this.scMain.TabIndex = 9;
     200            //
     201            // panel1
     202            //
     203            this.panel1.Controls.Add(this.cbxApplication);
     204            this.panel1.Controls.Add(this.label1);
     205            this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
     206            this.panel1.Location = new System.Drawing.Point(0, 0);
     207            this.panel1.Name = "panel1";
     208            this.panel1.Size = new System.Drawing.Size(1100, 51);
     209            this.panel1.TabIndex = 0;
     210            //
     211            // cbxApplication
     212            //
     213            this.cbxApplication.DataSource = this.bsApplications;
     214            this.cbxApplication.DisplayMember = "ApplicationName";
     215            this.cbxApplication.FormattingEnabled = true;
     216            this.cbxApplication.Location = new System.Drawing.Point(910, 18);
     217            this.cbxApplication.Name = "cbxApplication";
     218            this.cbxApplication.Size = new System.Drawing.Size(178, 21);
     219            this.cbxApplication.TabIndex = 1;
     220            this.cbxApplication.SelectedIndexChanged += new System.EventHandler(this.cbxApplication_SelectedIndexChanged);
     221            //
     222            // bsApplications
     223            //
     224            this.bsApplications.DataSource = typeof(HeuristicLab.Services.Authentication.DataTransfer.Application);
     225            //
     226            // label1
     227            //
     228            this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
     229            this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     230            this.label1.Location = new System.Drawing.Point(0, 0);
     231            this.label1.Name = "label1";
     232            this.label1.Size = new System.Drawing.Size(1100, 51);
     233            this.label1.TabIndex = 0;
     234            this.label1.Text = "Heuristic Lab User Management";
     235            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
    130236            //
    131237            // tabControl1
     
    137243            this.tabControl1.Name = "tabControl1";
    138244            this.tabControl1.SelectedIndex = 0;
    139             this.tabControl1.Size = new System.Drawing.Size(1100, 505);
     245            this.tabControl1.Size = new System.Drawing.Size(1100, 555);
    140246            this.tabControl1.TabIndex = 0;
    141247            //
     
    143249            //
    144250            this.tabPage1.AutoScroll = true;
     251            this.tabPage1.Controls.Add(this.btnDeleteUser);
     252            this.tabPage1.Controls.Add(this.btnNewUser);
    145253            this.tabPage1.Controls.Add(this.dgvUsers);
    146             this.tabPage1.Controls.Add(this.tabControl2);
     254            this.tabPage1.Controls.Add(this.tcUser);
    147255            this.tabPage1.Location = new System.Drawing.Point(4, 22);
    148256            this.tabPage1.Name = "tabPage1";
    149257            this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
    150             this.tabPage1.Size = new System.Drawing.Size(1092, 479);
     258            this.tabPage1.Size = new System.Drawing.Size(1092, 529);
    151259            this.tabPage1.TabIndex = 0;
    152260            this.tabPage1.Text = "User";
    153261            this.tabPage1.UseVisualStyleBackColor = true;
    154262            //
     263            // btnDeleteUser
     264            //
     265            this.btnDeleteUser.Location = new System.Drawing.Point(89, 16);
     266            this.btnDeleteUser.Name = "btnDeleteUser";
     267            this.btnDeleteUser.Size = new System.Drawing.Size(75, 23);
     268            this.btnDeleteUser.TabIndex = 3;
     269            this.btnDeleteUser.Text = "delete user";
     270            this.btnDeleteUser.UseVisualStyleBackColor = true;
     271            this.btnDeleteUser.Click += new System.EventHandler(this.btnDeleteUser_Click);
     272            //
     273            // btnNewUser
     274            //
     275            this.btnNewUser.Location = new System.Drawing.Point(8, 16);
     276            this.btnNewUser.Name = "btnNewUser";
     277            this.btnNewUser.Size = new System.Drawing.Size(75, 23);
     278            this.btnNewUser.TabIndex = 2;
     279            this.btnNewUser.Text = "new User";
     280            this.btnNewUser.UseVisualStyleBackColor = true;
     281            this.btnNewUser.Click += new System.EventHandler(this.btnNewUser_Click);
     282            //
     283            // dgvUsers
     284            //
     285            this.dgvUsers.AllowUserToAddRows = false;
     286            this.dgvUsers.AllowUserToDeleteRows = false;
     287            this.dgvUsers.AutoGenerateColumns = false;
     288            this.dgvUsers.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     289            this.dgvUsers.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
     290            this.userNameDataGridViewTextBoxColumn,
     291            this.isAnonymousDataGridViewCheckBoxColumn,
     292            this.Membership});
     293            this.dgvUsers.DataSource = this.bsUsers;
     294            this.dgvUsers.Location = new System.Drawing.Point(3, 45);
     295            this.dgvUsers.Name = "dgvUsers";
     296            this.dgvUsers.Size = new System.Drawing.Size(1086, 290);
     297            this.dgvUsers.TabIndex = 1;
     298            this.dgvUsers.SelectionChanged += new System.EventHandler(this.dgvUsers_SelectionChanged);
     299            //
     300            // bsUsers
     301            //
     302            this.bsUsers.DataSource = typeof(HeuristicLab.Services.Authentication.DataTransfer.User);
     303            //
     304            // tcUser
     305            //
     306            this.tcUser.Controls.Add(this.tabPage3);
     307            this.tcUser.Dock = System.Windows.Forms.DockStyle.Bottom;
     308            this.tcUser.Enabled = false;
     309            this.tcUser.Location = new System.Drawing.Point(3, 341);
     310            this.tcUser.Name = "tcUser";
     311            this.tcUser.SelectedIndex = 0;
     312            this.tcUser.Size = new System.Drawing.Size(1086, 185);
     313            this.tcUser.TabIndex = 0;
     314            //
     315            // tabPage3
     316            //
     317            this.tabPage3.AutoScroll = true;
     318            this.tabPage3.Controls.Add(passwordSaltLabel);
     319            this.tabPage3.Controls.Add(this.passwordSaltTextBox);
     320            this.tabPage3.Controls.Add(passwordQuestionLabel);
     321            this.tabPage3.Controls.Add(this.passwordQuestionTextBox);
     322            this.tabPage3.Controls.Add(passwordLabel);
     323            this.tabPage3.Controls.Add(this.passwordTextBox);
     324            this.tabPage3.Controls.Add(userNameLabel);
     325            this.tabPage3.Controls.Add(this.userNameTextBox);
     326            this.tabPage3.Controls.Add(emailLabel);
     327            this.tabPage3.Controls.Add(this.emailTextBox);
     328            this.tabPage3.Controls.Add(this.btnSaveUser);
     329            this.tabPage3.Location = new System.Drawing.Point(4, 22);
     330            this.tabPage3.Name = "tabPage3";
     331            this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
     332            this.tabPage3.Size = new System.Drawing.Size(1078, 159);
     333            this.tabPage3.TabIndex = 0;
     334            this.tabPage3.Text = "Detail";
     335            this.tabPage3.UseVisualStyleBackColor = true;
     336            //
     337            // passwordSaltTextBox
     338            //
     339            this.passwordSaltTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsUser, "Membership.PasswordSalt", true));
     340            this.passwordSaltTextBox.Location = new System.Drawing.Point(134, 127);
     341            this.passwordSaltTextBox.Name = "passwordSaltTextBox";
     342            this.passwordSaltTextBox.Size = new System.Drawing.Size(145, 20);
     343            this.passwordSaltTextBox.TabIndex = 17;
     344            //
     345            // bsUser
     346            //
     347            this.bsUser.DataSource = typeof(HeuristicLab.Services.Authentication.DataTransfer.User);
     348            //
     349            // passwordQuestionTextBox
     350            //
     351            this.passwordQuestionTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsUser, "PasswordQuestion", true));
     352            this.passwordQuestionTextBox.Location = new System.Drawing.Point(134, 73);
     353            this.passwordQuestionTextBox.Name = "passwordQuestionTextBox";
     354            this.passwordQuestionTextBox.Size = new System.Drawing.Size(145, 20);
     355            this.passwordQuestionTextBox.TabIndex = 16;
     356            //
     357            // passwordTextBox
     358            //
     359            this.passwordTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsUser, "Password", true));
     360            this.passwordTextBox.Location = new System.Drawing.Point(134, 47);
     361            this.passwordTextBox.Name = "passwordTextBox";
     362            this.passwordTextBox.Size = new System.Drawing.Size(145, 20);
     363            this.passwordTextBox.TabIndex = 15;
     364            //
     365            // userNameTextBox
     366            //
     367            this.userNameTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsUser, "UserName", true));
     368            this.userNameTextBox.Location = new System.Drawing.Point(134, 21);
     369            this.userNameTextBox.Name = "userNameTextBox";
     370            this.userNameTextBox.Size = new System.Drawing.Size(145, 20);
     371            this.userNameTextBox.TabIndex = 14;
     372            //
     373            // emailTextBox
     374            //
     375            this.emailTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsUser, "Email", true));
     376            this.emailTextBox.Location = new System.Drawing.Point(134, 99);
     377            this.emailTextBox.Name = "emailTextBox";
     378            this.emailTextBox.Size = new System.Drawing.Size(145, 20);
     379            this.emailTextBox.TabIndex = 13;
     380            //
     381            // btnSaveUser
     382            //
     383            this.btnSaveUser.Location = new System.Drawing.Point(303, 19);
     384            this.btnSaveUser.Name = "btnSaveUser";
     385            this.btnSaveUser.Size = new System.Drawing.Size(75, 23);
     386            this.btnSaveUser.TabIndex = 12;
     387            this.btnSaveUser.Text = "Save";
     388            this.btnSaveUser.UseVisualStyleBackColor = true;
     389            this.btnSaveUser.Click += new System.EventHandler(this.btnSaveUser_Click);
     390            //
    155391            // tabPage2
    156392            //
    157393            this.tabPage2.AutoScroll = true;
     394            this.tabPage2.Controls.Add(this.btnDeleteRole);
     395            this.tabPage2.Controls.Add(this.btnNewRole);
    158396            this.tabPage2.Controls.Add(this.dgvRoles);
    159             this.tabPage2.Controls.Add(this.tabControl3);
     397            this.tabPage2.Controls.Add(this.tcRole);
    160398            this.tabPage2.Location = new System.Drawing.Point(4, 22);
    161399            this.tabPage2.Name = "tabPage2";
    162400            this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
    163             this.tabPage2.Size = new System.Drawing.Size(1092, 479);
     401            this.tabPage2.Size = new System.Drawing.Size(1092, 529);
    164402            this.tabPage2.TabIndex = 1;
    165403            this.tabPage2.Text = "Roles";
    166404            this.tabPage2.UseVisualStyleBackColor = true;
    167405            //
    168             // tabControl2
    169             //
    170             this.tabControl2.Controls.Add(this.tabPage3);
    171             this.tabControl2.Controls.Add(this.tabPage4);
    172             this.tabControl2.Dock = System.Windows.Forms.DockStyle.Bottom;
    173             this.tabControl2.Location = new System.Drawing.Point(3, 291);
    174             this.tabControl2.Name = "tabControl2";
    175             this.tabControl2.SelectedIndex = 0;
    176             this.tabControl2.Size = new System.Drawing.Size(1086, 185);
    177             this.tabControl2.TabIndex = 0;
    178             //
    179             // tabPage4
    180             //
    181             this.tabPage4.Controls.Add(this.dataGridView1);
    182             this.tabPage4.Location = new System.Drawing.Point(4, 22);
    183             this.tabPage4.Name = "tabPage4";
    184             this.tabPage4.Padding = new System.Windows.Forms.Padding(3);
    185             this.tabPage4.Size = new System.Drawing.Size(1078, 159);
    186             this.tabPage4.TabIndex = 1;
    187             this.tabPage4.Text = "Roles";
    188             this.tabPage4.UseVisualStyleBackColor = true;
    189             //
    190             // tabControl3
    191             //
    192             this.tabControl3.Controls.Add(this.tabPage5);
    193             this.tabControl3.Controls.Add(this.tabPage6);
    194             this.tabControl3.Dock = System.Windows.Forms.DockStyle.Bottom;
    195             this.tabControl3.Location = new System.Drawing.Point(3, 291);
    196             this.tabControl3.Name = "tabControl3";
    197             this.tabControl3.SelectedIndex = 0;
    198             this.tabControl3.Size = new System.Drawing.Size(1086, 185);
    199             this.tabControl3.TabIndex = 1;
    200             //
    201             // tabPage5
    202             //
    203             this.tabPage5.Controls.Add(roleNameLabel);
    204             this.tabPage5.Controls.Add(this.roleNameTextBox);
    205             this.tabPage5.Location = new System.Drawing.Point(4, 22);
    206             this.tabPage5.Name = "tabPage5";
    207             this.tabPage5.Padding = new System.Windows.Forms.Padding(3);
    208             this.tabPage5.Size = new System.Drawing.Size(1078, 159);
    209             this.tabPage5.TabIndex = 0;
    210             this.tabPage5.Text = "Detail";
    211             this.tabPage5.UseVisualStyleBackColor = true;
     406            // btnDeleteRole
     407            //
     408            this.btnDeleteRole.Enabled = false;
     409            this.btnDeleteRole.Location = new System.Drawing.Point(89, 16);
     410            this.btnDeleteRole.Name = "btnDeleteRole";
     411            this.btnDeleteRole.Size = new System.Drawing.Size(75, 23);
     412            this.btnDeleteRole.TabIndex = 4;
     413            this.btnDeleteRole.Text = "delete Role";
     414            this.btnDeleteRole.UseVisualStyleBackColor = true;
     415            this.btnDeleteRole.Click += new System.EventHandler(this.btnDeleteRole_Click);
     416            //
     417            // btnNewRole
     418            //
     419            this.btnNewRole.Location = new System.Drawing.Point(8, 16);
     420            this.btnNewRole.Name = "btnNewRole";
     421            this.btnNewRole.Size = new System.Drawing.Size(75, 23);
     422            this.btnNewRole.TabIndex = 3;
     423            this.btnNewRole.Text = "new Role";
     424            this.btnNewRole.UseVisualStyleBackColor = true;
     425            this.btnNewRole.Click += new System.EventHandler(this.btnNewRole_Click);
     426            //
     427            // dgvRoles
     428            //
     429            this.dgvRoles.AllowUserToAddRows = false;
     430            this.dgvRoles.AllowUserToDeleteRows = false;
     431            this.dgvRoles.AutoGenerateColumns = false;
     432            this.dgvRoles.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     433            this.dgvRoles.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
     434            this.roleNameDataGridViewTextBoxColumn,
     435            this.loweredRoleNameDataGridViewTextBoxColumn,
     436            this.descriptionDataGridViewTextBoxColumn});
     437            this.dgvRoles.DataSource = this.bsRoles;
     438            this.dgvRoles.Location = new System.Drawing.Point(3, 45);
     439            this.dgvRoles.MultiSelect = false;
     440            this.dgvRoles.Name = "dgvRoles";
     441            this.dgvRoles.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
     442            this.dgvRoles.Size = new System.Drawing.Size(1086, 290);
     443            this.dgvRoles.TabIndex = 2;
     444            this.dgvRoles.SelectionChanged += new System.EventHandler(this.dgvRoles_SelectionChanged);
     445            //
     446            // roleNameDataGridViewTextBoxColumn
     447            //
     448            this.roleNameDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
     449            this.roleNameDataGridViewTextBoxColumn.DataPropertyName = "RoleName";
     450            this.roleNameDataGridViewTextBoxColumn.HeaderText = "Name";
     451            this.roleNameDataGridViewTextBoxColumn.Name = "roleNameDataGridViewTextBoxColumn";
     452            //
     453            // loweredRoleNameDataGridViewTextBoxColumn
     454            //
     455            this.loweredRoleNameDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
     456            this.loweredRoleNameDataGridViewTextBoxColumn.DataPropertyName = "LoweredRoleName";
     457            this.loweredRoleNameDataGridViewTextBoxColumn.HeaderText = "Lowered Name";
     458            this.loweredRoleNameDataGridViewTextBoxColumn.Name = "loweredRoleNameDataGridViewTextBoxColumn";
     459            this.loweredRoleNameDataGridViewTextBoxColumn.Width = 96;
     460            //
     461            // descriptionDataGridViewTextBoxColumn
     462            //
     463            this.descriptionDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
     464            this.descriptionDataGridViewTextBoxColumn.DataPropertyName = "Description";
     465            this.descriptionDataGridViewTextBoxColumn.HeaderText = "Description";
     466            this.descriptionDataGridViewTextBoxColumn.Name = "descriptionDataGridViewTextBoxColumn";
     467            this.descriptionDataGridViewTextBoxColumn.Width = 85;
     468            //
     469            // bsRoles
     470            //
     471            this.bsRoles.DataSource = typeof(HeuristicLab.Services.Authentication.DataTransfer.Role);
     472            //
     473            // tcRole
     474            //
     475            this.tcRole.Controls.Add(this.tpRoleDetail);
     476            this.tcRole.Controls.Add(this.tabPage6);
     477            this.tcRole.Dock = System.Windows.Forms.DockStyle.Bottom;
     478            this.tcRole.Enabled = false;
     479            this.tcRole.Location = new System.Drawing.Point(3, 341);
     480            this.tcRole.Name = "tcRole";
     481            this.tcRole.SelectedIndex = 0;
     482            this.tcRole.Size = new System.Drawing.Size(1086, 185);
     483            this.tcRole.TabIndex = 1;
     484            //
     485            // tpRoleDetail
     486            //
     487            this.tpRoleDetail.Controls.Add(descriptionLabel);
     488            this.tpRoleDetail.Controls.Add(this.descriptionTextBox);
     489            this.tpRoleDetail.Controls.Add(this.btnSaveRole);
     490            this.tpRoleDetail.Controls.Add(roleNameLabel);
     491            this.tpRoleDetail.Controls.Add(this.roleNameTextBox);
     492            this.tpRoleDetail.Location = new System.Drawing.Point(4, 22);
     493            this.tpRoleDetail.Name = "tpRoleDetail";
     494            this.tpRoleDetail.Padding = new System.Windows.Forms.Padding(3);
     495            this.tpRoleDetail.Size = new System.Drawing.Size(1078, 159);
     496            this.tpRoleDetail.TabIndex = 0;
     497            this.tpRoleDetail.Text = "Detail";
     498            this.tpRoleDetail.UseVisualStyleBackColor = true;
     499            //
     500            // descriptionTextBox
     501            //
     502            this.descriptionTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsRole, "Description", true));
     503            this.descriptionTextBox.Location = new System.Drawing.Point(81, 54);
     504            this.descriptionTextBox.Name = "descriptionTextBox";
     505            this.descriptionTextBox.Size = new System.Drawing.Size(191, 20);
     506            this.descriptionTextBox.TabIndex = 4;
     507            //
     508            // bsRole
     509            //
     510            this.bsRole.DataSource = typeof(HeuristicLab.Services.Authentication.DataTransfer.Role);
     511            //
     512            // btnSaveRole
     513            //
     514            this.btnSaveRole.Location = new System.Drawing.Point(197, 80);
     515            this.btnSaveRole.Name = "btnSaveRole";
     516            this.btnSaveRole.Size = new System.Drawing.Size(75, 23);
     517            this.btnSaveRole.TabIndex = 2;
     518            this.btnSaveRole.Text = "Save Role";
     519            this.btnSaveRole.UseVisualStyleBackColor = true;
     520            this.btnSaveRole.Click += new System.EventHandler(this.btnSaveRole_Click);
     521            //
     522            // roleNameTextBox
     523            //
     524            this.roleNameTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsRole, "RoleName", true));
     525            this.roleNameTextBox.Location = new System.Drawing.Point(81, 19);
     526            this.roleNameTextBox.Name = "roleNameTextBox";
     527            this.roleNameTextBox.Size = new System.Drawing.Size(191, 20);
     528            this.roleNameTextBox.TabIndex = 1;
    212529            //
    213530            // tabPage6
    214531            //
    215             this.tabPage6.Controls.Add(this.dataGridView2);
     532            this.tabPage6.Controls.Add(this.label3);
     533            this.tabPage6.Controls.Add(this.label2);
     534            this.tabPage6.Controls.Add(this.dgvRoleAssignedUsers);
     535            this.tabPage6.Controls.Add(this.btnAddUserToRole);
     536            this.tabPage6.Controls.Add(this.btnRemoveUserFromRole);
     537            this.tabPage6.Controls.Add(this.dgvRoleAvailableUsers);
    216538            this.tabPage6.Location = new System.Drawing.Point(4, 22);
    217539            this.tabPage6.Name = "tabPage6";
     
    222544            this.tabPage6.UseVisualStyleBackColor = true;
    223545            //
    224             // dgvUsers
    225             //
    226             this.dgvUsers.AutoGenerateColumns = false;
    227             this.dgvUsers.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
    228             this.dgvUsers.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
    229             this.membershipDataGridViewTextBoxColumn,
    230             this.applicationIdDataGridViewTextBoxColumn,
    231             this.userIdDataGridViewTextBoxColumn,
    232             this.userNameDataGridViewTextBoxColumn,
    233             this.loweredUserNameDataGridViewTextBoxColumn,
    234             this.mobileAliasDataGridViewTextBoxColumn,
    235             this.isAnonymousDataGridViewCheckBoxColumn,
    236             this.lastActivityDateDataGridViewTextBoxColumn});
    237             this.dgvUsers.DataSource = this.bsUsers;
    238             this.dgvUsers.Dock = System.Windows.Forms.DockStyle.Fill;
    239             this.dgvUsers.Location = new System.Drawing.Point(3, 3);
    240             this.dgvUsers.Name = "dgvUsers";
    241             this.dgvUsers.Size = new System.Drawing.Size(1086, 288);
    242             this.dgvUsers.TabIndex = 1;
    243             //
    244             // dgvRoles
    245             //
    246             this.dgvRoles.AllowUserToAddRows = false;
    247             this.dgvRoles.AllowUserToDeleteRows = false;
    248             this.dgvRoles.AutoGenerateColumns = false;
    249             this.dgvRoles.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
    250             this.dgvRoles.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
    251             this.roleIdDataGridViewTextBoxColumn,
    252             this.roleNameDataGridViewTextBoxColumn,
    253             this.loweredRoleNameDataGridViewTextBoxColumn,
    254             this.descriptionDataGridViewTextBoxColumn});
    255             this.dgvRoles.DataSource = this.bsRoles;
    256             this.dgvRoles.Dock = System.Windows.Forms.DockStyle.Fill;
    257             this.dgvRoles.Location = new System.Drawing.Point(3, 3);
    258             this.dgvRoles.MultiSelect = false;
    259             this.dgvRoles.Name = "dgvRoles";
    260             this.dgvRoles.Size = new System.Drawing.Size(1086, 288);
    261             this.dgvRoles.TabIndex = 2;
    262             //
    263             // panel1
    264             //
    265             this.panel1.Controls.Add(this.label1);
    266             this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
    267             this.panel1.Location = new System.Drawing.Point(0, 0);
    268             this.panel1.Name = "panel1";
    269             this.panel1.Size = new System.Drawing.Size(1100, 47);
    270             this.panel1.TabIndex = 0;
    271             //
    272             // label1
    273             //
    274             this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
    275             this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
    276             this.label1.Location = new System.Drawing.Point(0, 0);
    277             this.label1.Name = "label1";
    278             this.label1.Size = new System.Drawing.Size(1100, 47);
    279             this.label1.TabIndex = 0;
    280             this.label1.Text = "Heuristic Lab User Management";
    281             this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
    282             //
    283             // membershipDataGridViewTextBoxColumn
    284             //
    285             this.membershipDataGridViewTextBoxColumn.DataPropertyName = "Membership";
    286             this.membershipDataGridViewTextBoxColumn.HeaderText = "Membership";
    287             this.membershipDataGridViewTextBoxColumn.Name = "membershipDataGridViewTextBoxColumn";
    288             //
    289             // applicationIdDataGridViewTextBoxColumn
    290             //
    291             this.applicationIdDataGridViewTextBoxColumn.DataPropertyName = "ApplicationId";
    292             this.applicationIdDataGridViewTextBoxColumn.HeaderText = "ApplicationId";
    293             this.applicationIdDataGridViewTextBoxColumn.Name = "applicationIdDataGridViewTextBoxColumn";
    294             //
    295             // userIdDataGridViewTextBoxColumn
    296             //
    297             this.userIdDataGridViewTextBoxColumn.DataPropertyName = "UserId";
    298             this.userIdDataGridViewTextBoxColumn.HeaderText = "UserId";
    299             this.userIdDataGridViewTextBoxColumn.Name = "userIdDataGridViewTextBoxColumn";
     546            // label3
     547            //
     548            this.label3.AutoSize = true;
     549            this.label3.Location = new System.Drawing.Point(501, 18);
     550            this.label3.Name = "label3";
     551            this.label3.Size = new System.Drawing.Size(79, 13);
     552            this.label3.TabIndex = 6;
     553            this.label3.Text = "available Users";
     554            //
     555            // label2
     556            //
     557            this.label2.AutoSize = true;
     558            this.label2.Location = new System.Drawing.Point(6, 18);
     559            this.label2.Name = "label2";
     560            this.label2.Size = new System.Drawing.Size(79, 13);
     561            this.label2.TabIndex = 5;
     562            this.label2.Text = "assigned Users";
     563            //
     564            // dgvRoleAssignedUsers
     565            //
     566            this.dgvRoleAssignedUsers.AllowUserToAddRows = false;
     567            this.dgvRoleAssignedUsers.AllowUserToDeleteRows = false;
     568            this.dgvRoleAssignedUsers.AutoGenerateColumns = false;
     569            this.dgvRoleAssignedUsers.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     570            this.dgvRoleAssignedUsers.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
     571            this.userNameDataGridViewTextBoxColumn2});
     572            this.dgvRoleAssignedUsers.DataSource = this.bsRoleUsers;
     573            this.dgvRoleAssignedUsers.Location = new System.Drawing.Point(6, 34);
     574            this.dgvRoleAssignedUsers.Name = "dgvRoleAssignedUsers";
     575            this.dgvRoleAssignedUsers.Size = new System.Drawing.Size(346, 110);
     576            this.dgvRoleAssignedUsers.TabIndex = 4;
     577            //
     578            // userNameDataGridViewTextBoxColumn2
     579            //
     580            this.userNameDataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
     581            this.userNameDataGridViewTextBoxColumn2.DataPropertyName = "UserName";
     582            this.userNameDataGridViewTextBoxColumn2.HeaderText = "UserName";
     583            this.userNameDataGridViewTextBoxColumn2.Name = "userNameDataGridViewTextBoxColumn2";
     584            //
     585            // bsRoleUsers
     586            //
     587            this.bsRoleUsers.DataSource = typeof(HeuristicLab.Services.Authentication.DataTransfer.User);
     588            //
     589            // btnAddUserToRole
     590            //
     591            this.btnAddUserToRole.Location = new System.Drawing.Point(469, 34);
     592            this.btnAddUserToRole.Name = "btnAddUserToRole";
     593            this.btnAddUserToRole.Size = new System.Drawing.Size(29, 23);
     594            this.btnAddUserToRole.TabIndex = 3;
     595            this.btnAddUserToRole.Text = "+";
     596            this.btnAddUserToRole.UseVisualStyleBackColor = true;
     597            this.btnAddUserToRole.Click += new System.EventHandler(this.btnAddUserToRole_Click);
     598            //
     599            // btnRemoveUserFromRole
     600            //
     601            this.btnRemoveUserFromRole.Location = new System.Drawing.Point(358, 34);
     602            this.btnRemoveUserFromRole.Name = "btnRemoveUserFromRole";
     603            this.btnRemoveUserFromRole.Size = new System.Drawing.Size(29, 23);
     604            this.btnRemoveUserFromRole.TabIndex = 2;
     605            this.btnRemoveUserFromRole.Text = "-";
     606            this.btnRemoveUserFromRole.UseVisualStyleBackColor = true;
     607            this.btnRemoveUserFromRole.Click += new System.EventHandler(this.btnRemoveUserFromRole_Click);
     608            //
     609            // dgvRoleAvailableUsers
     610            //
     611            this.dgvRoleAvailableUsers.AllowUserToAddRows = false;
     612            this.dgvRoleAvailableUsers.AllowUserToDeleteRows = false;
     613            this.dgvRoleAvailableUsers.AutoGenerateColumns = false;
     614            this.dgvRoleAvailableUsers.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     615            this.dgvRoleAvailableUsers.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
     616            this.userNameDataGridViewTextBoxColumn1});
     617            this.dgvRoleAvailableUsers.DataSource = this.bsUsers;
     618            this.dgvRoleAvailableUsers.Location = new System.Drawing.Point(504, 34);
     619            this.dgvRoleAvailableUsers.Name = "dgvRoleAvailableUsers";
     620            this.dgvRoleAvailableUsers.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
     621            this.dgvRoleAvailableUsers.Size = new System.Drawing.Size(348, 110);
     622            this.dgvRoleAvailableUsers.TabIndex = 1;
     623            //
     624            // userNameDataGridViewTextBoxColumn1
     625            //
     626            this.userNameDataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
     627            this.userNameDataGridViewTextBoxColumn1.DataPropertyName = "UserName";
     628            this.userNameDataGridViewTextBoxColumn1.HeaderText = "UserName";
     629            this.userNameDataGridViewTextBoxColumn1.Name = "userNameDataGridViewTextBoxColumn1";
     630            //
     631            // bsUserRoles
     632            //
     633            this.bsUserRoles.DataSource = typeof(HeuristicLab.Services.Authentication.DataTransfer.Role);
     634            //
     635            // Membership
     636            //
     637            this.Membership.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
     638            this.Membership.DataPropertyName = "Membership.Email";
     639            this.Membership.HeaderText = "EMail";
     640            this.Membership.Name = "Membership";
     641            this.Membership.Width = 58;
     642            //
     643            // isAnonymousDataGridViewCheckBoxColumn
     644            //
     645            this.isAnonymousDataGridViewCheckBoxColumn.DataPropertyName = "IsAnonymous";
     646            this.isAnonymousDataGridViewCheckBoxColumn.HeaderText = "IsAnonymous";
     647            this.isAnonymousDataGridViewCheckBoxColumn.Name = "isAnonymousDataGridViewCheckBoxColumn";
    300648            //
    301649            // userNameDataGridViewTextBoxColumn
    302650            //
     651            this.userNameDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
    303652            this.userNameDataGridViewTextBoxColumn.DataPropertyName = "UserName";
    304653            this.userNameDataGridViewTextBoxColumn.HeaderText = "UserName";
    305654            this.userNameDataGridViewTextBoxColumn.Name = "userNameDataGridViewTextBoxColumn";
    306655            //
    307             // loweredUserNameDataGridViewTextBoxColumn
    308             //
    309             this.loweredUserNameDataGridViewTextBoxColumn.DataPropertyName = "LoweredUserName";
    310             this.loweredUserNameDataGridViewTextBoxColumn.HeaderText = "LoweredUserName";
    311             this.loweredUserNameDataGridViewTextBoxColumn.Name = "loweredUserNameDataGridViewTextBoxColumn";
    312             //
    313             // mobileAliasDataGridViewTextBoxColumn
    314             //
    315             this.mobileAliasDataGridViewTextBoxColumn.DataPropertyName = "MobileAlias";
    316             this.mobileAliasDataGridViewTextBoxColumn.HeaderText = "MobileAlias";
    317             this.mobileAliasDataGridViewTextBoxColumn.Name = "mobileAliasDataGridViewTextBoxColumn";
    318             //
    319             // isAnonymousDataGridViewCheckBoxColumn
    320             //
    321             this.isAnonymousDataGridViewCheckBoxColumn.DataPropertyName = "IsAnonymous";
    322             this.isAnonymousDataGridViewCheckBoxColumn.HeaderText = "IsAnonymous";
    323             this.isAnonymousDataGridViewCheckBoxColumn.Name = "isAnonymousDataGridViewCheckBoxColumn";
    324             //
    325             // lastActivityDateDataGridViewTextBoxColumn
    326             //
    327             this.lastActivityDateDataGridViewTextBoxColumn.DataPropertyName = "LastActivityDate";
    328             this.lastActivityDateDataGridViewTextBoxColumn.HeaderText = "LastActivityDate";
    329             this.lastActivityDateDataGridViewTextBoxColumn.Name = "lastActivityDateDataGridViewTextBoxColumn";
    330             //
    331             // tabPage3
    332             //
    333             this.tabPage3.AutoScroll = true;
    334             this.tabPage3.Controls.Add(emailLabel);
    335             this.tabPage3.Controls.Add(this.emailTextBox);
    336             this.tabPage3.Controls.Add(passwordSaltLabel);
    337             this.tabPage3.Controls.Add(this.passwordSaltTextBox);
    338             this.tabPage3.Controls.Add(passwordQuestionLabel);
    339             this.tabPage3.Controls.Add(this.passwordQuestionTextBox);
    340             this.tabPage3.Controls.Add(passwordAnswerLabel);
    341             this.tabPage3.Controls.Add(this.passwordAnswerTextBox);
    342             this.tabPage3.Controls.Add(passwordLabel);
    343             this.tabPage3.Controls.Add(this.passwordTextBox);
    344             this.tabPage3.Controls.Add(isAnonymousLabel);
    345             this.tabPage3.Controls.Add(this.isAnonymousCheckBox);
    346             this.tabPage3.Location = new System.Drawing.Point(4, 22);
    347             this.tabPage3.Name = "tabPage3";
    348             this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
    349             this.tabPage3.Size = new System.Drawing.Size(1078, 159);
    350             this.tabPage3.TabIndex = 0;
    351             this.tabPage3.Text = "Detail";
    352             this.tabPage3.UseVisualStyleBackColor = true;
    353             //
    354             // isAnonymousLabel
    355             //
    356             isAnonymousLabel.AutoSize = true;
    357             isAnonymousLabel.Location = new System.Drawing.Point(15, 22);
    358             isAnonymousLabel.Name = "isAnonymousLabel";
    359             isAnonymousLabel.Size = new System.Drawing.Size(76, 13);
    360             isAnonymousLabel.TabIndex = 0;
    361             isAnonymousLabel.Text = "Is Anonymous:";
    362             //
    363             // isAnonymousCheckBox
    364             //
    365             this.isAnonymousCheckBox.DataBindings.Add(new System.Windows.Forms.Binding("CheckState", this.bsUsers, "IsAnonymous", true));
    366             this.isAnonymousCheckBox.Location = new System.Drawing.Point(98, 17);
    367             this.isAnonymousCheckBox.Name = "isAnonymousCheckBox";
    368             this.isAnonymousCheckBox.Size = new System.Drawing.Size(104, 24);
    369             this.isAnonymousCheckBox.TabIndex = 1;
    370             this.isAnonymousCheckBox.Text = "checkBox1";
    371             this.isAnonymousCheckBox.UseVisualStyleBackColor = true;
    372             //
    373             // passwordLabel
    374             //
    375             passwordLabel.AutoSize = true;
    376             passwordLabel.Location = new System.Drawing.Point(15, 73);
    377             passwordLabel.Name = "passwordLabel";
    378             passwordLabel.Size = new System.Drawing.Size(56, 13);
    379             passwordLabel.TabIndex = 2;
    380             passwordLabel.Text = "Password:";
    381             //
    382             // passwordTextBox
    383             //
    384             this.passwordTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsUsers, "Membership.Password", true));
    385             this.passwordTextBox.Location = new System.Drawing.Point(98, 70);
    386             this.passwordTextBox.Name = "passwordTextBox";
    387             this.passwordTextBox.Size = new System.Drawing.Size(203, 20);
    388             this.passwordTextBox.TabIndex = 3;
    389             //
    390             // passwordAnswerLabel
    391             //
    392             passwordAnswerLabel.AutoSize = true;
    393             passwordAnswerLabel.Location = new System.Drawing.Point(318, 46);
    394             passwordAnswerLabel.Name = "passwordAnswerLabel";
    395             passwordAnswerLabel.Size = new System.Drawing.Size(94, 13);
    396             passwordAnswerLabel.TabIndex = 4;
    397             passwordAnswerLabel.Text = "Password Answer:";
    398             //
    399             // passwordAnswerTextBox
    400             //
    401             this.passwordAnswerTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsUsers, "Membership.PasswordAnswer", true));
    402             this.passwordAnswerTextBox.Location = new System.Drawing.Point(425, 43);
    403             this.passwordAnswerTextBox.Name = "passwordAnswerTextBox";
    404             this.passwordAnswerTextBox.Size = new System.Drawing.Size(188, 20);
    405             this.passwordAnswerTextBox.TabIndex = 5;
    406             //
    407             // passwordQuestionLabel
    408             //
    409             passwordQuestionLabel.AutoSize = true;
    410             passwordQuestionLabel.Location = new System.Drawing.Point(318, 73);
    411             passwordQuestionLabel.Name = "passwordQuestionLabel";
    412             passwordQuestionLabel.Size = new System.Drawing.Size(101, 13);
    413             passwordQuestionLabel.TabIndex = 6;
    414             passwordQuestionLabel.Text = "Password Question:";
    415             //
    416             // passwordQuestionTextBox
    417             //
    418             this.passwordQuestionTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsUsers, "Membership.PasswordQuestion", true));
    419             this.passwordQuestionTextBox.Location = new System.Drawing.Point(425, 70);
    420             this.passwordQuestionTextBox.Name = "passwordQuestionTextBox";
    421             this.passwordQuestionTextBox.Size = new System.Drawing.Size(188, 20);
    422             this.passwordQuestionTextBox.TabIndex = 7;
    423             //
    424             // passwordSaltLabel
    425             //
    426             passwordSaltLabel.AutoSize = true;
    427             passwordSaltLabel.Location = new System.Drawing.Point(15, 99);
    428             passwordSaltLabel.Name = "passwordSaltLabel";
    429             passwordSaltLabel.Size = new System.Drawing.Size(77, 13);
    430             passwordSaltLabel.TabIndex = 8;
    431             passwordSaltLabel.Text = "Password Salt:";
    432             //
    433             // passwordSaltTextBox
    434             //
    435             this.passwordSaltTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsUsers, "Membership.PasswordSalt", true));
    436             this.passwordSaltTextBox.Location = new System.Drawing.Point(99, 96);
    437             this.passwordSaltTextBox.Name = "passwordSaltTextBox";
    438             this.passwordSaltTextBox.Size = new System.Drawing.Size(202, 20);
    439             this.passwordSaltTextBox.TabIndex = 9;
    440             //
    441             // emailLabel
    442             //
    443             emailLabel.AutoSize = true;
    444             emailLabel.Location = new System.Drawing.Point(15, 46);
    445             emailLabel.Name = "emailLabel";
    446             emailLabel.Size = new System.Drawing.Size(35, 13);
    447             emailLabel.TabIndex = 10;
    448             emailLabel.Text = "Email:";
    449             //
    450             // emailTextBox
    451             //
    452             this.emailTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsUsers, "Membership.Email", true));
    453             this.emailTextBox.Location = new System.Drawing.Point(98, 43);
    454             this.emailTextBox.Name = "emailTextBox";
    455             this.emailTextBox.Size = new System.Drawing.Size(203, 20);
    456             this.emailTextBox.TabIndex = 11;
    457             //
    458             // dataGridView1
    459             //
    460             this.dataGridView1.AllowUserToAddRows = false;
    461             this.dataGridView1.AllowUserToDeleteRows = false;
    462             this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
    463             this.dataGridView1.Location = new System.Drawing.Point(6, 22);
    464             this.dataGridView1.Name = "dataGridView1";
    465             this.dataGridView1.ReadOnly = true;
    466             this.dataGridView1.Size = new System.Drawing.Size(437, 91);
    467             this.dataGridView1.TabIndex = 0;
    468             //
    469             // roleNameLabel
    470             //
    471             roleNameLabel.AutoSize = true;
    472             roleNameLabel.Location = new System.Drawing.Point(12, 22);
    473             roleNameLabel.Name = "roleNameLabel";
    474             roleNameLabel.Size = new System.Drawing.Size(63, 13);
    475             roleNameLabel.TabIndex = 0;
    476             roleNameLabel.Text = "Role Name:";
    477             //
    478             // roleNameTextBox
    479             //
    480             this.roleNameTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsRoles, "RoleName", true));
    481             this.roleNameTextBox.Location = new System.Drawing.Point(81, 19);
    482             this.roleNameTextBox.Name = "roleNameTextBox";
    483             this.roleNameTextBox.Size = new System.Drawing.Size(191, 20);
    484             this.roleNameTextBox.TabIndex = 1;
    485             //
    486             // dataGridView2
    487             //
    488             this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
    489             this.dataGridView2.Location = new System.Drawing.Point(34, 28);
    490             this.dataGridView2.Name = "dataGridView2";
    491             this.dataGridView2.Size = new System.Drawing.Size(520, 108);
    492             this.dataGridView2.TabIndex = 0;
    493             //
    494             // roleIdDataGridViewTextBoxColumn
    495             //
    496             this.roleIdDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
    497             this.roleIdDataGridViewTextBoxColumn.DataPropertyName = "RoleId";
    498             this.roleIdDataGridViewTextBoxColumn.HeaderText = "Id";
    499             this.roleIdDataGridViewTextBoxColumn.Name = "roleIdDataGridViewTextBoxColumn";
    500             this.roleIdDataGridViewTextBoxColumn.Width = 41;
    501             //
    502             // roleNameDataGridViewTextBoxColumn
    503             //
    504             this.roleNameDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
    505             this.roleNameDataGridViewTextBoxColumn.DataPropertyName = "RoleName";
    506             this.roleNameDataGridViewTextBoxColumn.HeaderText = "Name";
    507             this.roleNameDataGridViewTextBoxColumn.Name = "roleNameDataGridViewTextBoxColumn";
    508             //
    509             // loweredRoleNameDataGridViewTextBoxColumn
    510             //
    511             this.loweredRoleNameDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
    512             this.loweredRoleNameDataGridViewTextBoxColumn.DataPropertyName = "LoweredRoleName";
    513             this.loweredRoleNameDataGridViewTextBoxColumn.HeaderText = "Lowered Name";
    514             this.loweredRoleNameDataGridViewTextBoxColumn.Name = "loweredRoleNameDataGridViewTextBoxColumn";
    515             this.loweredRoleNameDataGridViewTextBoxColumn.Width = 96;
    516             //
    517             // descriptionDataGridViewTextBoxColumn
    518             //
    519             this.descriptionDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
    520             this.descriptionDataGridViewTextBoxColumn.DataPropertyName = "Description";
    521             this.descriptionDataGridViewTextBoxColumn.HeaderText = "Description";
    522             this.descriptionDataGridViewTextBoxColumn.Name = "descriptionDataGridViewTextBoxColumn";
    523             this.descriptionDataGridViewTextBoxColumn.Width = 85;
    524             //
    525656            // UserManagement
    526657            //
    527658            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    528659            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    529             this.ClientSize = new System.Drawing.Size(1100, 556);
     660            this.ClientSize = new System.Drawing.Size(1100, 610);
    530661            this.Controls.Add(this.scMain);
    531662            this.Name = "UserManagement";
    532663            this.Text = "UserManagement";
    533             ((System.ComponentModel.ISupportInitialize)(this.bsUsers)).EndInit();
    534             ((System.ComponentModel.ISupportInitialize)(this.bsRoles)).EndInit();
    535664            this.scMain.Panel1.ResumeLayout(false);
    536665            this.scMain.Panel2.ResumeLayout(false);
    537666            ((System.ComponentModel.ISupportInitialize)(this.scMain)).EndInit();
    538667            this.scMain.ResumeLayout(false);
     668            this.panel1.ResumeLayout(false);
     669            ((System.ComponentModel.ISupportInitialize)(this.bsApplications)).EndInit();
    539670            this.tabControl1.ResumeLayout(false);
    540671            this.tabPage1.ResumeLayout(false);
    541             this.tabPage2.ResumeLayout(false);
    542             this.tabControl2.ResumeLayout(false);
    543             this.tabPage4.ResumeLayout(false);
    544             this.tabControl3.ResumeLayout(false);
    545             this.tabPage5.ResumeLayout(false);
    546             this.tabPage5.PerformLayout();
    547             this.tabPage6.ResumeLayout(false);
    548672            ((System.ComponentModel.ISupportInitialize)(this.dgvUsers)).EndInit();
    549             ((System.ComponentModel.ISupportInitialize)(this.dgvRoles)).EndInit();
    550             this.panel1.ResumeLayout(false);
     673            ((System.ComponentModel.ISupportInitialize)(this.bsUsers)).EndInit();
     674            this.tcUser.ResumeLayout(false);
    551675            this.tabPage3.ResumeLayout(false);
    552676            this.tabPage3.PerformLayout();
    553             ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
    554             ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).EndInit();
     677            ((System.ComponentModel.ISupportInitialize)(this.bsUser)).EndInit();
     678            this.tabPage2.ResumeLayout(false);
     679            ((System.ComponentModel.ISupportInitialize)(this.dgvRoles)).EndInit();
     680            ((System.ComponentModel.ISupportInitialize)(this.bsRoles)).EndInit();
     681            this.tcRole.ResumeLayout(false);
     682            this.tpRoleDetail.ResumeLayout(false);
     683            this.tpRoleDetail.PerformLayout();
     684            ((System.ComponentModel.ISupportInitialize)(this.bsRole)).EndInit();
     685            this.tabPage6.ResumeLayout(false);
     686            this.tabPage6.PerformLayout();
     687            ((System.ComponentModel.ISupportInitialize)(this.dgvRoleAssignedUsers)).EndInit();
     688            ((System.ComponentModel.ISupportInitialize)(this.bsRoleUsers)).EndInit();
     689            ((System.ComponentModel.ISupportInitialize)(this.dgvRoleAvailableUsers)).EndInit();
     690            ((System.ComponentModel.ISupportInitialize)(this.bsUserRoles)).EndInit();
    555691            this.ResumeLayout(false);
    556692
     
    565701        private System.Windows.Forms.TabPage tabPage1;
    566702        private System.Windows.Forms.DataGridView dgvUsers;
    567         private System.Windows.Forms.TabControl tabControl2;
    568         private System.Windows.Forms.TabPage tabPage4;
     703        private System.Windows.Forms.TabControl tcUser;
    569704        private System.Windows.Forms.TabPage tabPage2;
    570705        private System.Windows.Forms.DataGridView dgvRoles;
    571         private System.Windows.Forms.TabControl tabControl3;
    572         private System.Windows.Forms.TabPage tabPage5;
     706        private System.Windows.Forms.TabControl tcRole;
     707        private System.Windows.Forms.TabPage tpRoleDetail;
    573708        private System.Windows.Forms.TabPage tabPage6;
    574709        private System.Windows.Forms.Panel panel1;
    575710        private System.Windows.Forms.Label label1;
    576         private System.Windows.Forms.DataGridViewTextBoxColumn membershipDataGridViewTextBoxColumn;
    577         private System.Windows.Forms.DataGridViewTextBoxColumn applicationIdDataGridViewTextBoxColumn;
    578         private System.Windows.Forms.DataGridViewTextBoxColumn userIdDataGridViewTextBoxColumn;
    579         private System.Windows.Forms.DataGridViewTextBoxColumn userNameDataGridViewTextBoxColumn;
    580         private System.Windows.Forms.DataGridViewTextBoxColumn loweredUserNameDataGridViewTextBoxColumn;
    581         private System.Windows.Forms.DataGridViewTextBoxColumn mobileAliasDataGridViewTextBoxColumn;
    582         private System.Windows.Forms.DataGridViewCheckBoxColumn isAnonymousDataGridViewCheckBoxColumn;
    583         private System.Windows.Forms.DataGridViewTextBoxColumn lastActivityDateDataGridViewTextBoxColumn;
     711        private System.Windows.Forms.TextBox roleNameTextBox;
     712        private System.Windows.Forms.Button btnNewUser;
     713        private System.Windows.Forms.BindingSource bsUser;
     714        private System.Windows.Forms.Button btnNewRole;
     715        private System.Windows.Forms.BindingSource bsRole;
     716        private System.Windows.Forms.BindingSource bsUserRoles;
     717        private System.Windows.Forms.BindingSource bsRoleUsers;
     718        private System.Windows.Forms.DataGridView dgvRoleAvailableUsers;
     719        private System.Windows.Forms.Button btnAddUserToRole;
     720        private System.Windows.Forms.Button btnRemoveUserFromRole;
     721        private System.Windows.Forms.Button btnSaveRole;
     722        private System.Windows.Forms.TextBox descriptionTextBox;
     723        private System.Windows.Forms.Button btnDeleteRole;
     724        private System.Windows.Forms.DataGridView dgvRoleAssignedUsers;
     725        private System.Windows.Forms.ComboBox cbxApplication;
     726        private System.Windows.Forms.BindingSource bsApplications;
     727        private System.Windows.Forms.Button btnDeleteUser;
    584728        private System.Windows.Forms.TabPage tabPage3;
     729        private System.Windows.Forms.Button btnSaveUser;
     730        private System.Windows.Forms.TextBox passwordQuestionTextBox;
     731        private System.Windows.Forms.TextBox passwordTextBox;
     732        private System.Windows.Forms.TextBox userNameTextBox;
    585733        private System.Windows.Forms.TextBox emailTextBox;
    586734        private System.Windows.Forms.TextBox passwordSaltTextBox;
    587         private System.Windows.Forms.TextBox passwordQuestionTextBox;
    588         private System.Windows.Forms.TextBox passwordAnswerTextBox;
    589         private System.Windows.Forms.TextBox passwordTextBox;
    590         private System.Windows.Forms.CheckBox isAnonymousCheckBox;
    591         private System.Windows.Forms.DataGridView dataGridView1;
    592         private System.Windows.Forms.DataGridViewTextBoxColumn roleIdDataGridViewTextBoxColumn;
     735        private System.Windows.Forms.Label label3;
     736        private System.Windows.Forms.Label label2;
     737        private System.Windows.Forms.DataGridViewTextBoxColumn userNameDataGridViewTextBoxColumn2;
     738        private System.Windows.Forms.DataGridViewTextBoxColumn userNameDataGridViewTextBoxColumn1;
    593739        private System.Windows.Forms.DataGridViewTextBoxColumn roleNameDataGridViewTextBoxColumn;
    594740        private System.Windows.Forms.DataGridViewTextBoxColumn loweredRoleNameDataGridViewTextBoxColumn;
    595741        private System.Windows.Forms.DataGridViewTextBoxColumn descriptionDataGridViewTextBoxColumn;
    596         private System.Windows.Forms.TextBox roleNameTextBox;
    597         private System.Windows.Forms.DataGridView dataGridView2;
     742        private System.Windows.Forms.DataGridViewTextBoxColumn userNameDataGridViewTextBoxColumn;
     743        private System.Windows.Forms.DataGridViewCheckBoxColumn isAnonymousDataGridViewCheckBoxColumn;
     744        private System.Windows.Forms.DataGridViewTextBoxColumn Membership;
    598745    }
    599746}
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/UserManagement.cs

    r4647 r4726  
    1616        AuthenticationService service;
    1717        Guid applicationId = new Guid("04371D20-8FD4-4607-A632-42C8D186786B");
     18       
    1819
    1920        public UserManagement()
     
    2930            if (service != null)
    3031            {
    31                 this.bsRoles.DataSource = service.GetRoles(applicationId);
    32                 this.bsUsers.DataSource = service.GetUsers(applicationId);
    3332
     33               
     34                RefreshApplicationlist();
     35            }
     36        }
     37
     38        private void RefreshApplicationlist()
     39        {
     40            this.bsApplications.DataSource = service.GetApplications();
     41            RefreshRolelist();
     42            RefreshUserlist();
     43        }
     44
     45        private void RefreshRolelist()
     46        {
     47            this.bsRoles.DataSource = service.GetRoles(applicationId);
     48        }
     49
     50        private void RefreshUserlist()
     51        {
     52            this.bsUsers.DataSource = service.GetUsers(applicationId);
     53        }
     54
     55        private void RefreshRoleUserlist(Guid roleId)
     56        {
     57            this.bsRoleUsers.DataSource = service.GetUsersInRole(roleId);
     58        }
     59
     60        private void dgvUsers_SelectionChanged(object sender, EventArgs e)
     61        {
     62            // show detail
     63            if(dgvUsers.SelectedRows.Count == 1){
     64                User user = (User)dgvUsers.SelectedRows[0].DataBoundItem;
     65                bsUser.DataSource = user;
     66                bsUserRoles.DataSource = service.GetRolesForUser(user.UserId);
     67                tcUser.Enabled = false;
     68            }
     69        }
     70
     71        private void dgvRoles_SelectionChanged(object sender, EventArgs e)
     72        {
     73            if (dgvRoles.SelectedRows.Count == 1)
     74            {
     75                Role role = (Role) dgvRoles.SelectedRows[0].DataBoundItem;
     76                bsRole.DataSource = role;
     77                IEnumerable<User> _l = service.GetUsersInRole(role.RoleId);
     78                bsRoleUsers.DataSource = service.GetUsersInRole(role.RoleId);
     79                btnDeleteRole.Enabled = true;
     80                tcRole.Enabled = true;
     81            }
     82        }
     83
     84        private void btnNewRole_Click(object sender, EventArgs e)
     85        {
     86            // new Role
     87            Role role = new Role();
     88            role.ApplicationId = applicationId;
     89            bsRole.DataSource = role;
     90            tcRole.Enabled = true;
     91        }
     92
     93        private void btnNewUser_Click(object sender, EventArgs e)
     94        {
     95            User user = new User();
     96            user.ApplicationId = applicationId;
     97            bsUser.DataSource = user;
     98            tcUser.Enabled = true;
     99        }
     100
     101        private void btnSaveUser_Click(object sender, EventArgs e)
     102        {
     103            User user = (User)bsUser.DataSource;
     104            tcUser.Enabled = false;
     105            service.InsertUser(user);
     106            RefreshUserlist();
     107           
     108        }
     109
     110        private void btnSaveRole_Click(object sender, EventArgs e)
     111        {
     112           Role role = (Role)bsRole.DataSource;
     113           role.ApplicationId = applicationId;
     114           service.InsertRole(role);
     115           tcRole.Enabled = false;
     116           RefreshRolelist();
     117        }
     118
     119       
     120
     121        private void btnAddUserToRole_Click(object sender, EventArgs e)
     122        {
     123            if (dgvRoleAvailableUsers.SelectedRows.Count == 1)
     124            {
     125                User user = (User)dgvRoleAvailableUsers.SelectedRows[0].DataBoundItem;
     126                Role role = (Role)bsRole.DataSource;
     127                role.ApplicationId = applicationId;
     128                user.ApplicationId = applicationId;
     129                service.AddUserToRole(role.RoleId, user.UserId);
     130                RefreshRoleUserlist(role.RoleId);
     131            }
     132        }
     133
     134        private void btnDeleteRole_Click(object sender, EventArgs e)
     135        {
     136            if (dgvRoles.SelectedRows.Count == 1)
     137            {
     138                Role role = (Role)dgvRoles.SelectedRows[0].DataBoundItem;
     139                service.DeleteRole(role.RoleId);
     140                RefreshRolelist();
     141            }
     142        }
     143
     144        private void btnRemoveUserFromRole_Click(object sender, EventArgs e)
     145        {
     146            // remove from role ..
     147            if (dgvRoleAssignedUsers.SelectedRows.Count == 1)
     148            {
     149                User user = (User)dgvRoleAssignedUsers.SelectedRows[0].DataBoundItem;
     150                Role role = (Role)bsRole.DataSource;
     151               
     152                service.RemoveUserFromRole(role.RoleId, user.UserId);
     153                RefreshRoleUserlist(role.RoleId);
     154            }
     155        }
     156
     157        private void cbxApplication_SelectedIndexChanged(object sender, EventArgs e)
     158        {
     159            HeuristicLab.Services.Authentication.DataTransfer.Application application = (HeuristicLab.Services.Authentication.DataTransfer.Application)cbxApplication.SelectedItem;
     160            if (application != null)
     161            {
     162                applicationId = application.ApplicationId;
     163                RefreshApplicationlist();
     164            }
     165
     166        }
     167
     168        private void btnDeleteUser_Click(object sender, EventArgs e)
     169        {
     170            if (dgvUsers.SelectedRows.Count == 1)
     171            {
     172                User user = (User)dgvUsers.SelectedRows[0].DataBoundItem;
     173                if (user != null)
     174                {
     175                    service.DeleteUser(user.UserId);
     176                    RefreshUserlist();
     177                }
    34178            }
    35179        }
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/UserManagement.resx

    r4647 r4726  
    118118    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    119119  </resheader>
    120   <metadata name="bsUsers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    121     <value>17, 17</value>
     120  <metadata name="roleNameLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     121    <value>False</value>
    122122  </metadata>
    123   <metadata name="bsRoles.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    124     <value>154, 17</value>
    125   </metadata>
    126   <metadata name="roleNameLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     123  <metadata name="descriptionLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    127124    <value>False</value>
    128125  </metadata>
     
    130127    <value>False</value>
    131128  </metadata>
    132   <metadata name="passwordSaltLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    133     <value>False</value>
    134   </metadata>
    135   <metadata name="passwordQuestionLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    136     <value>False</value>
    137   </metadata>
    138   <metadata name="passwordAnswerLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     129  <metadata name="userNameLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    139130    <value>False</value>
    140131  </metadata>
    141132  <metadata name="passwordLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    142     <value>False</value>
    143   </metadata>
    144   <metadata name="isAnonymousLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    145     <value>False</value>
    146   </metadata>
    147   <metadata name="isAnonymousLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    148     <value>False</value>
    149   </metadata>
    150   <metadata name="passwordLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    151     <value>False</value>
    152   </metadata>
    153   <metadata name="passwordAnswerLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    154133    <value>False</value>
    155134  </metadata>
     
    160139    <value>False</value>
    161140  </metadata>
    162   <metadata name="emailLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    163     <value>False</value>
     141  <metadata name="Membership.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     142    <value>True</value>
    164143  </metadata>
    165   <metadata name="roleNameLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    166     <value>False</value>
     144  <metadata name="bsUsers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     145    <value>17, 17</value>
     146  </metadata>
     147  <metadata name="bsApplications.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     148    <value>17, 56</value>
     149  </metadata>
     150  <metadata name="bsApplications.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     151    <value>17, 56</value>
     152  </metadata>
     153  <metadata name="bsUser.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     154    <value>273, 17</value>
     155  </metadata>
     156  <metadata name="bsUser.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     157    <value>273, 17</value>
     158  </metadata>
     159  <metadata name="bsRoles.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     160    <value>180, 17</value>
     161  </metadata>
     162  <metadata name="bsRoles.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     163    <value>180, 17</value>
     164  </metadata>
     165  <metadata name="bsRole.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     166    <value>480, 17</value>
     167  </metadata>
     168  <metadata name="bsRole.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     169    <value>480, 17</value>
     170  </metadata>
     171  <metadata name="bsRoleUsers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     172    <value>568, 17</value>
     173  </metadata>
     174  <metadata name="bsRoleUsers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     175    <value>568, 17</value>
     176  </metadata>
     177  <metadata name="bsUserRoles.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     178    <value>362, 17</value>
    167179  </metadata>
    168180</root>
  • branches/UserManagement/HeuristicLab.Services.Authentication/AuthenticationService.cs

    r4647 r4726  
    2626                               where item.UserId == id
    2727                               select item;
    28                     User user = Convert.ToDataTransfer((aspnet_User)User.Single());
     28                    aspnet_User eUser = User.Single();
     29
     30                    User user = Convert.ToDataTransfer((aspnet_User)eUser);
    2931
    3032                    if (user == null) { return null; }
    3133
    32                     Table<aspnet_Membership> MembershipTable = db.GetTable<aspnet_Membership>();
    33 
    34                     var Membership = from item in MembershipTable
    35                                      where item.UserId == id
    36                                      select item;
    37 
    38                     Membership membership = Convert.ToDataTransfer((aspnet_Membership)Membership.Single());
     34                    //Table<aspnet_Membership> MembershipTable = db.GetTable<aspnet_Membership>();
     35
     36                    //var Membership = from item in MembershipTable
     37                    //                 where item.UserId == id
     38                    //                 select item;
     39
     40                    Membership membership = Convert.ToDataTransfer((aspnet_Membership)eUser.aspnet_Membership);
    3941
    4042                    if (membership == null) { return null; }
     
    112114                        if (user== null) { return null; }
    113115
    114                         Table<aspnet_Membership> MembershipTable = db.GetTable<aspnet_Membership>();
    115 
    116                         var Membership = from item in MembershipTable
    117                                          where item.UserId == user.UserId
    118                                          select item;
    119 
    120                         Membership membership = Convert.ToDataTransfer((aspnet_Membership)Membership.Single());
     116                        //Table<aspnet_Membership> MembershipTable = db.GetTable<aspnet_Membership>();
     117
     118                        //var Membership = from item in MembershipTable
     119                        //                 where item.UserId == user.UserId
     120                        //                 select item;
     121
     122                        Membership membership = Convert.ToDataTransfer((aspnet_Membership)eUser.aspnet_Membership);
    121123
    122124                        if (membership == null) { return null; }
     
    456458                        Role role = GetRole(id);
    457459
    458                         bool deleteOnlyIfRoleIsEmpty = true;
     460                        bool deleteOnlyIfRoleIsEmpty = false;
    459461                        if (role == null)
    460462                        {
     
    716718        }
    717719
     720        public IEnumerable<DataTransfer.Application> GetApplications()
     721        {
     722            List<DataTransfer.Application> ApplicationList = new List<DataTransfer.Application>();
     723            using (UserManagementDataContext db = new UserManagementDataContext())
     724            {
     725                try
     726                {
     727                    Table<aspnet_Application> ApplicationTable = db.GetTable<aspnet_Application>();
     728                    var Applications = from item in ApplicationTable
     729                                select item;
     730                    foreach (var eApplication in Applications)
     731                    {
     732
     733                        Application application = Convert.ToDataTransfer(eApplication);
     734
     735                        if (application == null) { return null; }
     736
     737
     738                        ApplicationList.Add(application);
     739                    }
     740                }
     741                catch (Exception ex)
     742                {
     743                    Debug.WriteLine(ex.InnerException);
     744                    return new List<Application>();
     745                }
     746            }
     747
     748            return ApplicationList;
     749        }
     750
     751
     752
    718753        #endregion
    719754
  • branches/UserManagement/HeuristicLab.Services.Authentication/Interfaces/IAuthenticationService.cs

    r4647 r4726  
    8282        [OperationContract]
    8383        bool DeleteApplication(Application application);
     84
     85         [OperationContract]
     86        IEnumerable<DataTransfer.Application> GetApplications();
     87
    8488        #endregion
    8589
Note: See TracChangeset for help on using the changeset viewer.