Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4647


Ignore:
Timestamp:
10/26/10 19:55:07 (13 years ago)
Author:
mjesner
Message:

#1196

Location:
branches/UserManagement
Files:
6 deleted
16 edited

Legend:

Unmodified
Added
Removed
  • branches/UserManagement/HeuristicLab.Services.Authentication.DataAccess/HeuristicLab.Services.Authentication.DataAccess.csproj

    r4584 r4647  
    5757      <DependentUpon>UserManagement.dbml</DependentUpon>
    5858    </Compile>
     59    <Compile Include="_HeuristicLab_AuthenticationDataSet.Designer.cs">
     60      <AutoGen>True</AutoGen>
     61      <DesignTime>True</DesignTime>
     62      <DependentUpon>_HeuristicLab_AuthenticationDataSet.xsd</DependentUpon>
     63    </Compile>
    5964  </ItemGroup>
    6065  <ItemGroup>
     
    6873      <LastGenOutput>UserManagement.designer.cs</LastGenOutput>
    6974      <SubType>Designer</SubType>
     75    </None>
     76    <None Include="_HeuristicLab_AuthenticationDataSet.xsc">
     77      <DependentUpon>_HeuristicLab_AuthenticationDataSet.xsd</DependentUpon>
     78    </None>
     79    <None Include="_HeuristicLab_AuthenticationDataSet.xsd">
     80      <Generator>MSDataSetGenerator</Generator>
     81      <LastGenOutput>_HeuristicLab_AuthenticationDataSet.Designer.cs</LastGenOutput>
     82      <SubType>Designer</SubType>
     83    </None>
     84    <None Include="_HeuristicLab_AuthenticationDataSet.xss">
     85      <DependentUpon>_HeuristicLab_AuthenticationDataSet.xsd</DependentUpon>
    7086    </None>
    7187  </ItemGroup>
  • branches/UserManagement/HeuristicLab.Services.Authentication.DataAccess/UserManagement.dbml

    r4588 r4647  
    148148    <Return Type="System.Int32" />
    149149  </Function>
     150  <Function Name="dbo.aspnet_Users_CreateUser" Method="aspnet_Users_CreateUser">
     151    <Parameter Name="ApplicationId" Parameter="applicationId" Type="System.Guid" DbType="UniqueIdentifier" />
     152    <Parameter Name="UserName" Parameter="userName" Type="System.String" DbType="NVarChar(256)" />
     153    <Parameter Name="IsUserAnonymous" Parameter="isUserAnonymous" Type="System.Boolean" DbType="Bit" />
     154    <Parameter Name="LastActivityDate" Parameter="lastActivityDate" Type="System.DateTime" DbType="DateTime" />
     155    <Parameter Name="UserId" Parameter="userId" Type="System.Guid" DbType="UniqueIdentifier" Direction="InOut" />
     156    <Return Type="System.Int32" />
     157  </Function>
     158  <Function Name="dbo.aspnet_UsersInRoles_AddUsersToRoles" Method="aspnet_UsersInRoles_AddUsersToRoles">
     159    <Parameter Name="ApplicationName" Parameter="applicationName" Type="System.String" DbType="NVarChar(256)" />
     160    <Parameter Name="UserNames" Parameter="userNames" Type="System.String" DbType="NVarChar(4000)" />
     161    <Parameter Name="RoleNames" Parameter="roleNames" Type="System.String" DbType="NVarChar(4000)" />
     162    <Parameter Name="CurrentTimeUtc" Parameter="currentTimeUtc" Type="System.DateTime" DbType="DateTime" />
     163    <ElementType Name="aspnet_UsersInRoles_AddUsersToRolesResult">
     164      <Column Name="Name" Type="System.String" DbType="NVarChar(256) NOT NULL" CanBeNull="false" />
     165    </ElementType>
     166  </Function>
     167  <Function Name="dbo.aspnet_UsersInRoles_RemoveUsersFromRoles" Method="aspnet_UsersInRoles_RemoveUsersFromRoles">
     168    <Parameter Name="ApplicationName" Parameter="applicationName" Type="System.String" DbType="NVarChar(256)" />
     169    <Parameter Name="UserNames" Parameter="userNames" Type="System.String" DbType="NVarChar(4000)" />
     170    <Parameter Name="RoleNames" Parameter="roleNames" Type="System.String" DbType="NVarChar(4000)" />
     171    <ElementType Name="aspnet_UsersInRoles_RemoveUsersFromRolesResult">
     172      <Column Name="" Member="Column1" Type="System.String" DbType="NVarChar(1) NOT NULL" CanBeNull="false" />
     173      <Column Name="Name" Type="System.String" DbType="NVarChar(256) NOT NULL" CanBeNull="false" />
     174    </ElementType>
     175  </Function>
     176  <Function Name="dbo.aspnet_UsersInRoles_IsUserInRole" Method="aspnet_UsersInRoles_IsUserInRole">
     177    <Parameter Name="ApplicationName" Parameter="applicationName" Type="System.String" DbType="NVarChar(256)" />
     178    <Parameter Name="UserName" Parameter="userName" Type="System.String" DbType="NVarChar(256)" />
     179    <Parameter Name="RoleName" Parameter="roleName" Type="System.String" DbType="NVarChar(256)" />
     180    <Return Type="System.Int32" />
     181  </Function>
     182  <Function Name="dbo.aspnet_UsersInRoles_GetUsersInRoles" Method="aspnet_UsersInRoles_GetUsersInRoles">
     183    <Parameter Name="ApplicationName" Parameter="applicationName" Type="System.String" DbType="NVarChar(256)" />
     184    <Parameter Name="RoleName" Parameter="roleName" Type="System.String" DbType="NVarChar(256)" />
     185    <ElementType Name="aspnet_UsersInRoles_GetUsersInRolesResult">
     186      <Column Name="UserName" Type="System.String" DbType="NVarChar(256) NOT NULL" CanBeNull="false" />
     187    </ElementType>
     188  </Function>
     189  <Function Name="dbo.aspnet_UsersInRoles_GetRolesForUser" Method="aspnet_UsersInRoles_GetRolesForUser">
     190    <Parameter Name="ApplicationName" Parameter="applicationName" Type="System.String" DbType="NVarChar(256)" />
     191    <Parameter Name="UserName" Parameter="userName" Type="System.String" DbType="NVarChar(256)" />
     192    <ElementType Name="aspnet_UsersInRoles_GetRolesForUserResult">
     193      <Column Name="RoleName" Type="System.String" DbType="NVarChar(256) NOT NULL" CanBeNull="false" />
     194    </ElementType>
     195  </Function>
     196  <Function Name="dbo.aspnet_UsersInRoles_FindUsersInRole" Method="aspnet_UsersInRoles_FindUsersInRole">
     197    <Parameter Name="ApplicationName" Parameter="applicationName" Type="System.String" DbType="NVarChar(256)" />
     198    <Parameter Name="RoleName" Parameter="roleName" Type="System.String" DbType="NVarChar(256)" />
     199    <Parameter Name="UserNameToMatch" Parameter="userNameToMatch" Type="System.String" DbType="NVarChar(256)" />
     200    <ElementType Name="aspnet_UsersInRoles_FindUsersInRoleResult">
     201      <Column Name="UserName" Type="System.String" DbType="NVarChar(256) NOT NULL" CanBeNull="false" />
     202    </ElementType>
     203  </Function>
     204  <Function Name="dbo.aspnet_Roles_CreateRole" Method="aspnet_Roles_CreateRole">
     205    <Parameter Name="ApplicationName" Parameter="applicationName" Type="System.String" DbType="NVarChar(256)" />
     206    <Parameter Name="RoleName" Parameter="roleName" Type="System.String" DbType="NVarChar(256)" />
     207    <Return Type="System.Int32" />
     208  </Function>
     209  <Function Name="dbo.aspnet_Roles_DeleteRole" Method="aspnet_Roles_DeleteRole">
     210    <Parameter Name="ApplicationName" Parameter="applicationName" Type="System.String" DbType="NVarChar(256)" />
     211    <Parameter Name="RoleName" Parameter="roleName" Type="System.String" DbType="NVarChar(256)" />
     212    <Parameter Name="DeleteOnlyIfRoleIsEmpty" Parameter="deleteOnlyIfRoleIsEmpty" Type="System.Boolean" DbType="Bit" />
     213    <Return Type="System.Int32" />
     214  </Function>
     215  <Function Name="dbo.aspnet_Applications_CreateApplication" Method="aspnet_Applications_CreateApplication">
     216    <Parameter Name="ApplicationName" Parameter="applicationName" Type="System.String" DbType="NVarChar(256)" />
     217    <Parameter Name="ApplicationId" Parameter="applicationId" Type="System.Guid" DbType="UniqueIdentifier" Direction="InOut" />
     218    <Return Type="System.Int32" />
     219  </Function>
     220  <Function Name="dbo.aspnet_Roles_RoleExists" Method="aspnet_Roles_RoleExists">
     221    <Parameter Name="ApplicationName" Parameter="applicationName" Type="System.String" DbType="NVarChar(256)" />
     222    <Parameter Name="RoleName" Parameter="roleName" Type="System.String" DbType="NVarChar(256)" />
     223    <Return Type="System.Int32" />
     224  </Function>
     225  <Function Name="dbo.aspnet_Roles_GetAllRoles" Method="aspnet_Roles_GetAllRoles">
     226    <Parameter Name="ApplicationName" Parameter="applicationName" Type="System.String" DbType="NVarChar(256)" />
     227    <ElementType Name="aspnet_Roles_GetAllRolesResult">
     228      <Column Name="RoleName" Type="System.String" DbType="NVarChar(256) NOT NULL" CanBeNull="false" />
     229    </ElementType>
     230  </Function>
     231  <Function Name="dbo.aspnet_Membership_CreateUser" Method="aspnet_Membership_CreateUser">
     232    <Parameter Name="ApplicationName" Parameter="applicationName" Type="System.String" DbType="NVarChar(256)" />
     233    <Parameter Name="UserName" Parameter="userName" Type="System.String" DbType="NVarChar(256)" />
     234    <Parameter Name="Password" Parameter="password" Type="System.String" DbType="NVarChar(128)" />
     235    <Parameter Name="PasswordSalt" Parameter="passwordSalt" Type="System.String" DbType="NVarChar(128)" />
     236    <Parameter Name="Email" Parameter="email" Type="System.String" DbType="NVarChar(256)" />
     237    <Parameter Name="PasswordQuestion" Parameter="passwordQuestion" Type="System.String" DbType="NVarChar(256)" />
     238    <Parameter Name="PasswordAnswer" Parameter="passwordAnswer" Type="System.String" DbType="NVarChar(128)" />
     239    <Parameter Name="IsApproved" Parameter="isApproved" Type="System.Boolean" DbType="Bit" />
     240    <Parameter Name="CurrentTimeUtc" Parameter="currentTimeUtc" Type="System.DateTime" DbType="DateTime" />
     241    <Parameter Name="CreateDate" Parameter="createDate" Type="System.DateTime" DbType="DateTime" />
     242    <Parameter Name="UniqueEmail" Parameter="uniqueEmail" Type="System.Int32" DbType="Int" />
     243    <Parameter Name="PasswordFormat" Parameter="passwordFormat" Type="System.Int32" DbType="Int" />
     244    <Parameter Name="UserId" Parameter="userId" Type="System.Guid" DbType="UniqueIdentifier" Direction="InOut" />
     245    <Return Type="System.Int32" />
     246  </Function>
    150247</Database>
  • branches/UserManagement/HeuristicLab.Services.Authentication.DataAccess/UserManagement.dbml.layout

    r4588 r4647  
    11<?xml version="1.0" encoding="utf-8"?>
    2 <ordesignerObjectsDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 11, 14.875" name="UserManagement">
     2<ordesignerObjectsDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 13.375, 11.75" name="UserManagement">
    33  <DataContextMoniker Name="/UserManagementDataContext" />
    44  <nestedChildShapes>
    5     <classShape Id="ec805621-974f-4416-9b33-1f52c9efaa02" absoluteBounds="0.5, 0.5, 2, 1.5785953776041666">
     5    <classShape Id="ec805621-974f-4416-9b33-1f52c9efaa02" absoluteBounds="1.875, 6, 2, 1.5785953776041666">
    66      <DataClassMoniker Name="/UserManagementDataContext/aspnet_Application" />
    77      <nestedChildShapes>
    8         <elementListCompartment Id="d2f5e07d-74d6-4c49-808d-d6ea4f17d8fc" absoluteBounds="0.515, 0.96, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     8        <elementListCompartment Id="d2f5e07d-74d6-4c49-808d-d6ea4f17d8fc" absoluteBounds="1.8899999999999997, 6.46, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    99      </nestedChildShapes>
    1010    </classShape>
    11     <classShape Id="7dc71a3b-61f9-453c-8e9b-ebf950468436" absoluteBounds="3.625, 1.125, 2, 4.8477197265625">
     11    <classShape Id="7dc71a3b-61f9-453c-8e9b-ebf950468436" absoluteBounds="4.625, 0.5, 2, 4.8477197265625">
    1212      <DataClassMoniker Name="/UserManagementDataContext/aspnet_Membership" />
    1313      <nestedChildShapes>
    14         <elementListCompartment Id="4245b681-0b9d-40fd-bda3-b6fc3aadf805" absoluteBounds="3.64, 1.585, 1.9700000000000002, 4.2877197265625" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     14        <elementListCompartment Id="4245b681-0b9d-40fd-bda3-b6fc3aadf805" absoluteBounds="4.6400000000000006, 0.96, 1.9700000000000002, 4.2877197265625" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    1515      </nestedChildShapes>
    1616    </classShape>
    17     <associationConnector edgePoints="[(2.5 : 1.60179768880208); (2.66666666666667 : 1.60179768880208 : JumpStart); (2.83333333333333 : 1.60179768880208 : JumpEnd); (3.625 : 1.60179768880208)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     17    <associationConnector edgePoints="[(3.78125 : 6); (3.78125 : 2.56814697265625); (4.625 : 2.56814697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    1818      <AssociationMoniker Name="/UserManagementDataContext/aspnet_Application/aspnet_Application_aspnet_Membership" />
    1919      <nodes>
     
    2222      </nodes>
    2323    </associationConnector>
    24     <classShape Id="7343514d-b96d-43be-aac1-1642639dfda8" absoluteBounds="7.375, 1, 2, 1.5785953776041666">
     24    <classShape Id="7343514d-b96d-43be-aac1-1642639dfda8" absoluteBounds="1.5, 3.125, 2, 1.5785953776041666">
    2525      <DataClassMoniker Name="/UserManagementDataContext/aspnet_Path" />
    2626      <nestedChildShapes>
    27         <elementListCompartment Id="0b555909-5553-437e-8fb3-d8bb04dd2960" absoluteBounds="7.39, 1.46, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     27        <elementListCompartment Id="0b555909-5553-437e-8fb3-d8bb04dd2960" absoluteBounds="1.5149999999999997, 3.585, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    2828      </nestedChildShapes>
    2929    </classShape>
    30     <associationConnector edgePoints="[(2.5 : 1.03125); (2.66666666666667 : 1.03125 : JumpStart); (2.83333333333333 : 1.03125 : JumpEnd); (5.79166666666667 : 1.03125 : JumpStart); (5.95833333333333 : 1.03125 : JumpEnd); (7.375 : 1.03125)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     30    <associationConnector edgePoints="[(2.6875 : 6); (2.6875 : 4.70359537760417)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    3131      <AssociationMoniker Name="/UserManagementDataContext/aspnet_Application/aspnet_Application_aspnet_Path" />
    3232      <nodes>
     
    3535      </nodes>
    3636    </associationConnector>
    37     <classShape Id="3b521864-bc4c-4283-8733-af46ed4fe8a7" absoluteBounds="0.5, 2.75, 2, 1.3862939453125">
     37    <classShape Id="3b521864-bc4c-4283-8733-af46ed4fe8a7" absoluteBounds="1.625, 0.625, 2, 1.3862939453125">
    3838      <DataClassMoniker Name="/UserManagementDataContext/aspnet_PersonalizationAllUser" />
    3939      <nestedChildShapes>
    40         <elementListCompartment Id="508a8e64-87d9-40bc-8fdb-f1cf0f62124c" absoluteBounds="0.515, 3.21, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     40        <elementListCompartment Id="508a8e64-87d9-40bc-8fdb-f1cf0f62124c" absoluteBounds="1.6400000000000001, 1.085, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    4141      </nestedChildShapes>
    4242    </classShape>
    43     <associationConnector edgePoints="[(7.375 : 1.83617468880208); (5.875 : 1.83617468880208); (5.875 : 0.625); (2.75 : 0.625); (2.75 : 2.32859537760417); (1.5 : 2.32859537760417); (1.5 : 2.75)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     43    <associationConnector edgePoints="[(3.05292168109001 : 3.125); (3.05292168109001 : 2.0112939453125)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    4444      <AssociationMoniker Name="/UserManagementDataContext/aspnet_Path/aspnet_Path_aspnet_PersonalizationAllUser" />
    4545      <nodes>
     
    4848      </nodes>
    4949    </associationConnector>
    50     <classShape Id="5013ff3a-8cce-4550-ac77-e9cee0ddc9ba" absoluteBounds="7.75, 3.875, 2, 1.7708968098958331">
     50    <classShape Id="5013ff3a-8cce-4550-ac77-e9cee0ddc9ba" absoluteBounds="11.125, 1.75, 2, 1.7708968098958331">
    5151      <DataClassMoniker Name="/UserManagementDataContext/aspnet_PersonalizationPerUser" />
    5252      <nestedChildShapes>
    53         <elementListCompartment Id="3c2e4362-9781-4d55-af9c-599ad3861a16" absoluteBounds="7.765, 4.335, 1.9700000000000002, 1.2108968098958333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     53        <elementListCompartment Id="3c2e4362-9781-4d55-af9c-599ad3861a16" absoluteBounds="11.14, 2.21, 1.9700000000000002, 1.2108968098958333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    5454      </nestedChildShapes>
    5555    </classShape>
    56     <associationConnector edgePoints="[(8.9375 : 2.57859537760417); (8.9375 : 3.875)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     56    <associationConnector edgePoints="[(3.5 : 3.91429768880208); (4.375 : 3.91429768880208); (4.375 : 5.5977197265625); (7.875 : 5.5977197265625); (7.875 : 3.875); (12.39062575 : 3.875); (12.39062575 : 3.52089680989583)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    5757      <AssociationMoniker Name="/UserManagementDataContext/aspnet_Path/aspnet_Path_aspnet_PersonalizationPerUser" />
    5858      <nodes>
     
    6161      </nodes>
    6262    </associationConnector>
    63     <classShape Id="86d1546c-0a9b-4dd7-844e-6eb30600f1b2" absoluteBounds="0.5, 5, 2, 1.7708968098958331">
     63    <classShape Id="86d1546c-0a9b-4dd7-844e-6eb30600f1b2" absoluteBounds="8, 0.5, 2, 1.7708968098958331">
    6464      <DataClassMoniker Name="/UserManagementDataContext/aspnet_Profile" />
    6565      <nestedChildShapes>
    66         <elementListCompartment Id="75b89f84-1a81-4940-8c47-c3935a3bc84d" absoluteBounds="0.515, 5.46, 1.9700000000000002, 1.2108968098958333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     66        <elementListCompartment Id="75b89f84-1a81-4940-8c47-c3935a3bc84d" absoluteBounds="8.015, 0.96, 1.9700000000000002, 1.2108968098958333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    6767      </nestedChildShapes>
    6868    </classShape>
    69     <classShape Id="833e2796-ac5a-4a62-b3a1-6cfd97c9a7b1" absoluteBounds="8, 6.375, 2, 1.7708968098958331">
     69    <classShape Id="833e2796-ac5a-4a62-b3a1-6cfd97c9a7b1" absoluteBounds="3.625, 9, 2, 1.7708968098958331">
    7070      <DataClassMoniker Name="/UserManagementDataContext/aspnet_Role" />
    7171      <nestedChildShapes>
    72         <elementListCompartment Id="4ebc7fb9-2342-4359-950b-d59908adb887" absoluteBounds="8.015, 6.835, 1.9700000000000002, 1.2108968098958333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     72        <elementListCompartment Id="4ebc7fb9-2342-4359-950b-d59908adb887" absoluteBounds="3.6400000000000006, 9.46, 1.9700000000000002, 1.2108968098958333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    7373      </nestedChildShapes>
    7474    </classShape>
    75     <associationConnector edgePoints="[(2.5 : 0.78125); (9.90625 : 0.78125); (9.90625 : 6.375)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     75    <associationConnector edgePoints="[(2.7499995 : 7.57859537760417); (2.7499995 : 9.88544840494792); (3.625 : 9.88544840494792)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    7676      <AssociationMoniker Name="/UserManagementDataContext/aspnet_Application/aspnet_Application_aspnet_Role" />
    7777      <nodes>
     
    8080      </nodes>
    8181    </associationConnector>
    82     <classShape Id="da1e6fa8-2149-42f4-a56c-f492cd62deb6" absoluteBounds="5, 6.75, 2, 1.3862939453125">
     82    <classShape Id="da1e6fa8-2149-42f4-a56c-f492cd62deb6" absoluteBounds="6.625, 10.125, 2, 1.3862939453125">
    8383      <DataClassMoniker Name="/UserManagementDataContext/aspnet_SchemaVersion" />
    8484      <nestedChildShapes>
    85         <elementListCompartment Id="7a2a020f-f4bb-490e-9a84-81f0f66b5e68" absoluteBounds="5.015, 7.21, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     85        <elementListCompartment Id="7a2a020f-f4bb-490e-9a84-81f0f66b5e68" absoluteBounds="6.6400000000000006, 10.585, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    8686      </nestedChildShapes>
    8787    </classShape>
    88     <classShape Id="6bceff2f-2d6b-4f24-b50d-2296ff7f62c3" absoluteBounds="0.75, 8.25, 2, 2.1554996744791666">
     88    <classShape Id="6bceff2f-2d6b-4f24-b50d-2296ff7f62c3" absoluteBounds="8.125, 4.125, 2, 2.1554996744791666">
    8989      <DataClassMoniker Name="/UserManagementDataContext/aspnet_User" />
    9090      <nestedChildShapes>
    91         <elementListCompartment Id="bf2f1444-f051-4d39-9055-c21643a53875" absoluteBounds="0.76500000000000012, 8.71, 1.9700000000000002, 1.5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     91        <elementListCompartment Id="bf2f1444-f051-4d39-9055-c21643a53875" absoluteBounds="8.14, 4.5850000000000009, 1.9700000000000002, 1.5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    9292      </nestedChildShapes>
    9393    </classShape>
    94     <associationConnector edgePoints="[(2.65625 : 8.25); (2.65625 : 4.56814697265625); (3.04166666666667 : 4.56814697265625 : JumpStart); (3.20833333333333 : 4.56814697265625 : JumpEnd); (3.625 : 4.56814697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     94    <associationConnector edgePoints="[(8.125 : 4.73635986328125); (6.625 : 4.73635986328125)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    9595      <AssociationMoniker Name="/UserManagementDataContext/aspnet_User/aspnet_User_aspnet_Membership" />
    9696      <nodes>
     
    9999      </nodes>
    100100    </associationConnector>
    101     <associationConnector edgePoints="[(2.75 : 9.32774983723958); (3.54166666666667 : 9.32774983723958 : JumpStart); (3.70833333333333 : 9.32774983723958 : JumpEnd); (7.84375 : 9.32774983723958); (7.84375 : 5.64589680989583)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     101    <associationConnector edgePoints="[(10.125 : 5.20274983723958); (11.5937475 : 5.20274983723958); (11.5937475 : 3.52089680989583)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    102102      <AssociationMoniker Name="/UserManagementDataContext/aspnet_User/aspnet_User_aspnet_PersonalizationPerUser" />
    103103      <nodes>
     
    106106      </nodes>
    107107    </associationConnector>
    108     <associationConnector edgePoints="[(1.625 : 8.25); (1.625 : 6.77089680989583)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     108    <associationConnector edgePoints="[(9.0625 : 4.125); (9.0625 : 2.27089680989583)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    109109      <AssociationMoniker Name="/UserManagementDataContext/aspnet_User/aspnet_User_aspnet_Profile" />
    110110      <nodes>
     
    113113      </nodes>
    114114    </associationConnector>
    115     <associationConnector edgePoints="[(2.5 : 2.07859537760417); (3.125 : 2.70359537760417); (3.125 : 7.875); (2.75 : 8.25153746153846)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     115    <associationConnector edgePoints="[(3.875 : 6.96080002604167); (9.2500025 : 6.96080002604167); (9.2500025 : 6.28049967447917)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    116116      <AssociationMoniker Name="/UserManagementDataContext/aspnet_Application/aspnet_Application_aspnet_User" />
    117117      <nodes>
     
    120120      </nodes>
    121121    </associationConnector>
    122     <classShape Id="a25c9c99-735f-4294-aabd-ba04c3f98575" absoluteBounds="1.25, 12.375, 2, 1.1939925130208333">
     122    <classShape Id="a25c9c99-735f-4294-aabd-ba04c3f98575" absoluteBounds="6.5, 8.25, 2, 1.1939925130208333">
    123123      <DataClassMoniker Name="/UserManagementDataContext/aspnet_UsersInRole" />
    124124      <nestedChildShapes>
    125         <elementListCompartment Id="f223e83f-c7c9-4564-8465-9e039f273520" absoluteBounds="1.2650000000000001, 12.835, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     125        <elementListCompartment Id="f223e83f-c7c9-4564-8465-9e039f273520" absoluteBounds="6.5150000000000006, 8.71, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    126126      </nestedChildShapes>
    127127    </classShape>
    128     <associationConnector edgePoints="[(8 : 8.14589680989583); (7.90267556509888 : 8.24322124479695 : JumpStart); (7.78482443490112 : 8.36107237499471 : JumpEnd); (7.625 : 8.52089680989583); (3.625 : 8.52089680989583); (3.625 : 12); (3.25 : 12.375)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     128    <associationConnector edgePoints="[(5.625 : 9.22199625651042); (6.5 : 9.22199625651042)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    129129      <AssociationMoniker Name="/UserManagementDataContext/aspnet_Role/aspnet_Role_aspnet_UsersInRole" />
    130130      <nodes>
     
    133133      </nodes>
    134134    </associationConnector>
    135     <associationConnector edgePoints="[(2 : 10.4054996744792); (2 : 12.375)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     135    <associationConnector edgePoints="[(8.3125 : 6.28049967447917); (8.3125 : 8.25)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    136136      <AssociationMoniker Name="/UserManagementDataContext/aspnet_User/aspnet_User_aspnet_UsersInRole" />
    137137      <nodes>
     
    140140      </nodes>
    141141    </associationConnector>
    142     <classShape Id="c85c3936-32dd-417e-a0af-7a03fb14cc36" absoluteBounds="7.375, 10.875, 2, 3.6939111328124996">
     142    <classShape Id="c85c3936-32dd-417e-a0af-7a03fb14cc36" absoluteBounds="10.25, 7.375, 2, 3.6939111328124996">
    143143      <DataClassMoniker Name="/UserManagementDataContext/aspnet_WebEvent_Event" />
    144144      <nestedChildShapes>
    145         <elementListCompartment Id="6a3d388c-ec23-47c6-a139-35716577f2d8" absoluteBounds="7.39, 11.335, 1.9700000000000002, 3.1339111328125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     145        <elementListCompartment Id="6a3d388c-ec23-47c6-a139-35716577f2d8" absoluteBounds="10.265, 7.8350000000000009, 1.9700000000000002, 3.1339111328125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    146146      </nestedChildShapes>
    147147    </classShape>
  • branches/UserManagement/HeuristicLab.Services.Authentication.DataAccess/UserManagement.designer.cs

    r4588 r4647  
    189189      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationName, userName, tablesToDeleteFrom, numTablesDeletedFrom);
    190190      numTablesDeletedFrom = ((System.Nullable<int>)(result.GetParameterValue(3)));
     191      return ((int)(result.ReturnValue));
     192    }
     193   
     194    [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.aspnet_Users_CreateUser")]
     195    public int aspnet_Users_CreateUser([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationId", DbType="UniqueIdentifier")] System.Nullable<System.Guid> applicationId, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UserName", DbType="NVarChar(256)")] string userName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="IsUserAnonymous", DbType="Bit")] System.Nullable<bool> isUserAnonymous, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="LastActivityDate", DbType="DateTime")] System.Nullable<System.DateTime> lastActivityDate, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UserId", DbType="UniqueIdentifier")] ref System.Nullable<System.Guid> userId)
     196    {
     197      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationId, userName, isUserAnonymous, lastActivityDate, userId);
     198      userId = ((System.Nullable<System.Guid>)(result.GetParameterValue(4)));
     199      return ((int)(result.ReturnValue));
     200    }
     201   
     202    [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.aspnet_UsersInRoles_AddUsersToRoles")]
     203    public ISingleResult<aspnet_UsersInRoles_AddUsersToRolesResult> aspnet_UsersInRoles_AddUsersToRoles([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationName", DbType="NVarChar(256)")] string applicationName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UserNames", DbType="NVarChar(4000)")] string userNames, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="RoleNames", DbType="NVarChar(4000)")] string roleNames, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="CurrentTimeUtc", DbType="DateTime")] System.Nullable<System.DateTime> currentTimeUtc)
     204    {
     205      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationName, userNames, roleNames, currentTimeUtc);
     206      return ((ISingleResult<aspnet_UsersInRoles_AddUsersToRolesResult>)(result.ReturnValue));
     207    }
     208   
     209    [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.aspnet_UsersInRoles_RemoveUsersFromRoles")]
     210    public ISingleResult<aspnet_UsersInRoles_RemoveUsersFromRolesResult> aspnet_UsersInRoles_RemoveUsersFromRoles([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationName", DbType="NVarChar(256)")] string applicationName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UserNames", DbType="NVarChar(4000)")] string userNames, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="RoleNames", DbType="NVarChar(4000)")] string roleNames)
     211    {
     212      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationName, userNames, roleNames);
     213      return ((ISingleResult<aspnet_UsersInRoles_RemoveUsersFromRolesResult>)(result.ReturnValue));
     214    }
     215   
     216    [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.aspnet_UsersInRoles_IsUserInRole")]
     217    public int aspnet_UsersInRoles_IsUserInRole([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationName", DbType="NVarChar(256)")] string applicationName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UserName", DbType="NVarChar(256)")] string userName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="RoleName", DbType="NVarChar(256)")] string roleName)
     218    {
     219      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationName, userName, roleName);
     220      return ((int)(result.ReturnValue));
     221    }
     222   
     223    [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.aspnet_UsersInRoles_GetUsersInRoles")]
     224    public ISingleResult<aspnet_UsersInRoles_GetUsersInRolesResult> aspnet_UsersInRoles_GetUsersInRoles([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationName", DbType="NVarChar(256)")] string applicationName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="RoleName", DbType="NVarChar(256)")] string roleName)
     225    {
     226      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationName, roleName);
     227      return ((ISingleResult<aspnet_UsersInRoles_GetUsersInRolesResult>)(result.ReturnValue));
     228    }
     229   
     230    [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.aspnet_UsersInRoles_GetRolesForUser")]
     231    public ISingleResult<aspnet_UsersInRoles_GetRolesForUserResult> aspnet_UsersInRoles_GetRolesForUser([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationName", DbType="NVarChar(256)")] string applicationName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UserName", DbType="NVarChar(256)")] string userName)
     232    {
     233      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationName, userName);
     234      return ((ISingleResult<aspnet_UsersInRoles_GetRolesForUserResult>)(result.ReturnValue));
     235    }
     236   
     237    [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.aspnet_UsersInRoles_FindUsersInRole")]
     238    public ISingleResult<aspnet_UsersInRoles_FindUsersInRoleResult> aspnet_UsersInRoles_FindUsersInRole([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationName", DbType="NVarChar(256)")] string applicationName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="RoleName", DbType="NVarChar(256)")] string roleName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UserNameToMatch", DbType="NVarChar(256)")] string userNameToMatch)
     239    {
     240      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationName, roleName, userNameToMatch);
     241      return ((ISingleResult<aspnet_UsersInRoles_FindUsersInRoleResult>)(result.ReturnValue));
     242    }
     243   
     244    [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.aspnet_Roles_CreateRole")]
     245    public int aspnet_Roles_CreateRole([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationName", DbType="NVarChar(256)")] string applicationName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="RoleName", DbType="NVarChar(256)")] string roleName)
     246    {
     247      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationName, roleName);
     248      return ((int)(result.ReturnValue));
     249    }
     250   
     251    [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.aspnet_Roles_DeleteRole")]
     252    public int aspnet_Roles_DeleteRole([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationName", DbType="NVarChar(256)")] string applicationName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="RoleName", DbType="NVarChar(256)")] string roleName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="DeleteOnlyIfRoleIsEmpty", DbType="Bit")] System.Nullable<bool> deleteOnlyIfRoleIsEmpty)
     253    {
     254      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationName, roleName, deleteOnlyIfRoleIsEmpty);
     255      return ((int)(result.ReturnValue));
     256    }
     257   
     258    [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.aspnet_Applications_CreateApplication")]
     259    public int aspnet_Applications_CreateApplication([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationName", DbType="NVarChar(256)")] string applicationName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationId", DbType="UniqueIdentifier")] ref System.Nullable<System.Guid> applicationId)
     260    {
     261      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationName, applicationId);
     262      applicationId = ((System.Nullable<System.Guid>)(result.GetParameterValue(1)));
     263      return ((int)(result.ReturnValue));
     264    }
     265   
     266    [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.aspnet_Roles_RoleExists")]
     267    public int aspnet_Roles_RoleExists([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationName", DbType="NVarChar(256)")] string applicationName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="RoleName", DbType="NVarChar(256)")] string roleName)
     268    {
     269      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationName, roleName);
     270      return ((int)(result.ReturnValue));
     271    }
     272   
     273    [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.aspnet_Roles_GetAllRoles")]
     274    public ISingleResult<aspnet_Roles_GetAllRolesResult> aspnet_Roles_GetAllRoles([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationName", DbType="NVarChar(256)")] string applicationName)
     275    {
     276      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationName);
     277      return ((ISingleResult<aspnet_Roles_GetAllRolesResult>)(result.ReturnValue));
     278    }
     279   
     280    [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.aspnet_Membership_CreateUser")]
     281    public int aspnet_Membership_CreateUser([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationName", DbType="NVarChar(256)")] string applicationName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UserName", DbType="NVarChar(256)")] string userName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="Password", DbType="NVarChar(128)")] string password, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="PasswordSalt", DbType="NVarChar(128)")] string passwordSalt, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="Email", DbType="NVarChar(256)")] string email, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="PasswordQuestion", DbType="NVarChar(256)")] string passwordQuestion, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="PasswordAnswer", DbType="NVarChar(128)")] string passwordAnswer, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="IsApproved", DbType="Bit")] System.Nullable<bool> isApproved, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="CurrentTimeUtc", DbType="DateTime")] System.Nullable<System.DateTime> currentTimeUtc, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="CreateDate", DbType="DateTime")] System.Nullable<System.DateTime> createDate, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UniqueEmail", DbType="Int")] System.Nullable<int> uniqueEmail, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="PasswordFormat", DbType="Int")] System.Nullable<int> passwordFormat, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UserId", DbType="UniqueIdentifier")] ref System.Nullable<System.Guid> userId)
     282    {
     283      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationName, userName, password, passwordSalt, email, passwordQuestion, passwordAnswer, isApproved, currentTimeUtc, createDate, uniqueEmail, passwordFormat, userId);
     284      userId = ((System.Nullable<System.Guid>)(result.GetParameterValue(12)));
    191285      return ((int)(result.ReturnValue));
    192286    }
     
    31573251    }
    31583252  }
     3253 
     3254  public partial class aspnet_UsersInRoles_AddUsersToRolesResult
     3255  {
     3256   
     3257    private string _Name;
     3258   
     3259    public aspnet_UsersInRoles_AddUsersToRolesResult()
     3260    {
     3261    }
     3262   
     3263    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(256) NOT NULL", CanBeNull=false)]
     3264    public string Name
     3265    {
     3266      get
     3267      {
     3268        return this._Name;
     3269      }
     3270      set
     3271      {
     3272        if ((this._Name != value))
     3273        {
     3274          this._Name = value;
     3275        }
     3276      }
     3277    }
     3278  }
     3279 
     3280  public partial class aspnet_UsersInRoles_RemoveUsersFromRolesResult
     3281  {
     3282   
     3283    private string _Column1;
     3284   
     3285    private string _Name;
     3286   
     3287    public aspnet_UsersInRoles_RemoveUsersFromRolesResult()
     3288    {
     3289    }
     3290   
     3291    [global::System.Data.Linq.Mapping.ColumnAttribute(Name="", Storage="_Column1", DbType="NVarChar(1) NOT NULL", CanBeNull=false)]
     3292    public string Column1
     3293    {
     3294      get
     3295      {
     3296        return this._Column1;
     3297      }
     3298      set
     3299      {
     3300        if ((this._Column1 != value))
     3301        {
     3302          this._Column1 = value;
     3303        }
     3304      }
     3305    }
     3306   
     3307    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(256) NOT NULL", CanBeNull=false)]
     3308    public string Name
     3309    {
     3310      get
     3311      {
     3312        return this._Name;
     3313      }
     3314      set
     3315      {
     3316        if ((this._Name != value))
     3317        {
     3318          this._Name = value;
     3319        }
     3320      }
     3321    }
     3322  }
     3323 
     3324  public partial class aspnet_UsersInRoles_GetUsersInRolesResult
     3325  {
     3326   
     3327    private string _UserName;
     3328   
     3329    public aspnet_UsersInRoles_GetUsersInRolesResult()
     3330    {
     3331    }
     3332   
     3333    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="NVarChar(256) NOT NULL", CanBeNull=false)]
     3334    public string UserName
     3335    {
     3336      get
     3337      {
     3338        return this._UserName;
     3339      }
     3340      set
     3341      {
     3342        if ((this._UserName != value))
     3343        {
     3344          this._UserName = value;
     3345        }
     3346      }
     3347    }
     3348  }
     3349 
     3350  public partial class aspnet_UsersInRoles_GetRolesForUserResult
     3351  {
     3352   
     3353    private string _RoleName;
     3354   
     3355    public aspnet_UsersInRoles_GetRolesForUserResult()
     3356    {
     3357    }
     3358   
     3359    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleName", DbType="NVarChar(256) NOT NULL", CanBeNull=false)]
     3360    public string RoleName
     3361    {
     3362      get
     3363      {
     3364        return this._RoleName;
     3365      }
     3366      set
     3367      {
     3368        if ((this._RoleName != value))
     3369        {
     3370          this._RoleName = value;
     3371        }
     3372      }
     3373    }
     3374  }
     3375 
     3376  public partial class aspnet_UsersInRoles_FindUsersInRoleResult
     3377  {
     3378   
     3379    private string _UserName;
     3380   
     3381    public aspnet_UsersInRoles_FindUsersInRoleResult()
     3382    {
     3383    }
     3384   
     3385    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="NVarChar(256) NOT NULL", CanBeNull=false)]
     3386    public string UserName
     3387    {
     3388      get
     3389      {
     3390        return this._UserName;
     3391      }
     3392      set
     3393      {
     3394        if ((this._UserName != value))
     3395        {
     3396          this._UserName = value;
     3397        }
     3398      }
     3399    }
     3400  }
     3401 
     3402  public partial class aspnet_Roles_GetAllRolesResult
     3403  {
     3404   
     3405    private string _RoleName;
     3406   
     3407    public aspnet_Roles_GetAllRolesResult()
     3408    {
     3409    }
     3410   
     3411    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleName", DbType="NVarChar(256) NOT NULL", CanBeNull=false)]
     3412    public string RoleName
     3413    {
     3414      get
     3415      {
     3416        return this._RoleName;
     3417      }
     3418      set
     3419      {
     3420        if ((this._RoleName != value))
     3421        {
     3422          this._RoleName = value;
     3423        }
     3424      }
     3425    }
     3426  }
    31593427}
    31603428#pragma warning restore 1591
  • branches/UserManagement/HeuristicLab.Services.Authentication.DataTransfer/Membership.cs

    r4590 r4647  
    1515        // [DataMember]
    1616        //  public string PasswordFormat { get; set; }
    17         //  [DataMember]
    18         //  public string PasswordSalt { get; set; }
     17          [DataMember]
     18          public string PasswordSalt { get; set; }
    1919        // [DataMember]
    2020        // public string MobilePIN { get; set; }
     
    2323        [DataMember]
    2424        public string LoweredEmail { get; set; }
    25         //  [DataMember]
    26         //  public string PasswordQuestion { get; set; }
    27         //  [DataMember]
    28         //  public string PasswordAnswer { get; set; }
     25        [DataMember]
     26        public string PasswordQuestion { get; set; }
     27        [DataMember]
     28        public string PasswordAnswer { get; set; }
    2929        [DataMember]
    3030        public bool IsApproved { get; set; }
  • branches/UserManagement/HeuristicLab.Services.Authentication.DataTransfer/User.cs

    r4590 r4647  
    1010    public class User
    1111    {
    12        
     12
     13        [DataMember]
     14        public Membership Membership { get; set; }
     15        [DataMember]
     16        public string Email
     17        {
     18            get { return Membership.Email; }
     19            set { Membership.Email = value; }
     20        }
     21        [DataMember]
     22        public string Password
     23        {
     24            get { return Membership.Password; }
     25            set { Membership.Password = value; }
     26        }
     27        [DataMember]
     28        public string PasswordQuestion
     29        {
     30            get { return Membership.PasswordQuestion; }
     31            set { this.Membership.PasswordQuestion = value; }
     32        }
    1333        [DataMember]
    1434        public Guid ApplicationId { get; set; }
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/HeuristicLab.Services.Authentication.TestClient.csproj

    r4590 r4647  
    3535  </PropertyGroup>
    3636  <ItemGroup>
     37    <Reference Include="HeuristicLab.Services.Authentication.DataAccess, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" />
    3738    <Reference Include="System" />
    3839    <Reference Include="System.Core" />
     40    <Reference Include="System.Data.Linq" />
    3941    <Reference Include="System.Data.Services.Client" />
    4042    <Reference Include="System.Drawing" />
     
    4850  </ItemGroup>
    4951  <ItemGroup>
    50     <Compile Include="RoleDetail.cs">
    51       <SubType>Form</SubType>
    52     </Compile>
    53     <Compile Include="RoleDetail.Designer.cs">
    54       <DependentUpon>RoleDetail.cs</DependentUpon>
    55     </Compile>
    5652    <Compile Include="TestClient.cs" />
    5753    <Compile Include="Properties\AssemblyInfo.cs" />
    58     <Compile Include="UserDetail.cs">
    59       <SubType>Form</SubType>
    60     </Compile>
    61     <Compile Include="UserDetail.Designer.cs">
    62       <DependentUpon>UserDetail.cs</DependentUpon>
    63     </Compile>
    6454    <Compile Include="UserManagement.cs">
    6555      <SubType>Form</SubType>
     
    8070  </ItemGroup>
    8171  <ItemGroup>
    82     <EmbeddedResource Include="RoleDetail.resx">
    83       <DependentUpon>RoleDetail.cs</DependentUpon>
    84     </EmbeddedResource>
    85     <EmbeddedResource Include="UserDetail.resx">
    86       <DependentUpon>UserDetail.cs</DependentUpon>
    87     </EmbeddedResource>
    8872    <EmbeddedResource Include="UserManagement.resx">
    8973      <DependentUpon>UserManagement.cs</DependentUpon>
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/TestClient.cs

    r4590 r4647  
    22
    33using System.Collections.Generic;
    4 using System.Windows.Forms;
     4
     5using HeuristicLab.Services.Authentication.DataTransfer;
    56
    67
     
    1213        {
    1314           
    14             Application.Run(new UserManagement());
    15 
    16             //AuthenticationService auth = new AuthenticationService();
    17 
    18             //try
    19             //{
    20             //    IEnumerable<User> list = new List<User>();
    21             //    list = auth.GetUsers();
    22             //    foreach (var item in list)
    23             //    {
    24             //        Console.WriteLine("Item=" + item.UserName);
    25             //    }
    26 
    27             //    Console.WriteLine("Try to delete user...");
    28 
    29             //   // User u = new User() { UserId =  };
    30             //    auth.DeleteUser(new Guid("e4abc6ae-c954-4efd-8108-e536226fd9c7"));
    31 
    32             //}
    33             //catch (Exception e)
    34             //{
    35             //    Console.WriteLine(e.Message);
    36             //}
    37             //Console.ReadLine();
    38             //ServiceClient client = new ServiceClient();
    39             //client.ClientCredentials.UserName.UserName = "Alice";
    40             //client.ClientCredentials.UserName.Password = "YouWillNeverKnow";
    41             //client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
    42 
    43             //try
    44             //{
    45             //    Console.WriteLine(client.GetData(23));
    46             //}
    47             //catch (Exception e)
    48             //{
    49             //    Console.WriteLine("test");
    50             //    Console.WriteLine(e.Message);
    51             //}
    52 
    53             //Console.ReadLine();
    54 
    55             //client.Close();
     15
     16
     17            AuthenticationService auth = new AuthenticationService();
     18
     19            try
     20            {
     21
     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("--------------------------");
     103
     104               
     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("--------------------------");
     158 
     159
     160               
     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                }
     232
     233
     234               
     235
     236            }
     237            catch (Exception e)
     238            {
     239                Console.WriteLine(e.Message);
     240            }
     241           
     242            // User form
     243
     244            System.Windows.Forms.Application.Run(new UserManagement());
     245           
    56246        }
    57247    }
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/UserManagement.Designer.cs

    r4590 r4647  
    3030        {
    3131            this.components = new System.ComponentModel.Container();
    32             this.grpUsers = new System.Windows.Forms.GroupBox();
     32            System.Windows.Forms.Label isAnonymousLabel;
     33            System.Windows.Forms.Label passwordLabel;
     34            System.Windows.Forms.Label passwordAnswerLabel;
     35            System.Windows.Forms.Label passwordQuestionLabel;
     36            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);
     41            this.scMain = new System.Windows.Forms.SplitContainer();
     42            this.tabControl1 = new System.Windows.Forms.TabControl();
     43            this.tabPage1 = new System.Windows.Forms.TabPage();
     44            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();
    3350            this.dgvUsers = new System.Windows.Forms.DataGridView();
    34             this.btnUserNew = new System.Windows.Forms.Button();
    35             this.btnUserModify = new System.Windows.Forms.Button();
    36             this.btnUserDelete = new System.Windows.Forms.Button();
    37             this.grpRoles = new System.Windows.Forms.GroupBox();
    3851            this.dgvRoles = new System.Windows.Forms.DataGridView();
    39             this.btnRoleNew = new System.Windows.Forms.Button();
    40             this.btnRoleModify = new System.Windows.Forms.Button();
    41             this.btnRoleDelete = new System.Windows.Forms.Button();
    42             this.scMain = new System.Windows.Forms.SplitContainer();
    4352            this.panel1 = new System.Windows.Forms.Panel();
    44             this.panel2 = new System.Windows.Forms.Panel();
    45             this.applicationIdDataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     53            this.label1 = new System.Windows.Forms.Label();
     54            this.membershipDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
     55            this.applicationIdDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    4656            this.userIdDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    4757            this.userNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
     
    5060            this.isAnonymousDataGridViewCheckBoxColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
    5161            this.lastActivityDateDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    52             this.bsUsers = new System.Windows.Forms.BindingSource(this.components);
    53             this.bsRoles = new System.Windows.Forms.BindingSource(this.components);
    54             this.applicationIdDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    55             this.RoleId = new System.Windows.Forms.DataGridViewTextBoxColumn();
    56             this.RoleName = new System.Windows.Forms.DataGridViewTextBoxColumn();
    57             this.LoweredRoleName = new System.Windows.Forms.DataGridViewTextBoxColumn();
    58             this.Description = new System.Windows.Forms.DataGridViewTextBoxColumn();
    59             this.grpUsers.SuspendLayout();
    60             ((System.ComponentModel.ISupportInitialize)(this.dgvUsers)).BeginInit();
    61             this.grpRoles.SuspendLayout();
    62             ((System.ComponentModel.ISupportInitialize)(this.dgvRoles)).BeginInit();
     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();
     73            this.roleNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
     74            this.loweredRoleNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
     75            this.descriptionDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
     76            isAnonymousLabel = new System.Windows.Forms.Label();
     77            passwordLabel = new System.Windows.Forms.Label();
     78            passwordAnswerLabel = new System.Windows.Forms.Label();
     79            passwordQuestionLabel = new System.Windows.Forms.Label();
     80            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();
    6385            ((System.ComponentModel.ISupportInitialize)(this.scMain)).BeginInit();
    6486            this.scMain.Panel1.SuspendLayout();
    6587            this.scMain.Panel2.SuspendLayout();
    6688            this.scMain.SuspendLayout();
     89            this.tabControl1.SuspendLayout();
     90            this.tabPage1.SuspendLayout();
     91            this.tabPage2.SuspendLayout();
     92            this.tabControl2.SuspendLayout();
     93            this.tabPage4.SuspendLayout();
     94            this.tabControl3.SuspendLayout();
     95            this.tabPage5.SuspendLayout();
     96            this.tabPage6.SuspendLayout();
     97            ((System.ComponentModel.ISupportInitialize)(this.dgvUsers)).BeginInit();
     98            ((System.ComponentModel.ISupportInitialize)(this.dgvRoles)).BeginInit();
    6799            this.panel1.SuspendLayout();
    68             this.panel2.SuspendLayout();
    69             ((System.ComponentModel.ISupportInitialize)(this.bsUsers)).BeginInit();
    70             ((System.ComponentModel.ISupportInitialize)(this.bsRoles)).BeginInit();
     100            this.tabPage3.SuspendLayout();
     101            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
     102            ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit();
    71103            this.SuspendLayout();
    72104            //
    73             // grpUsers
    74             //
    75             this.grpUsers.Controls.Add(this.dgvUsers);
    76             this.grpUsers.Dock = System.Windows.Forms.DockStyle.Fill;
    77             this.grpUsers.Location = new System.Drawing.Point(0, 0);
    78             this.grpUsers.Name = "grpUsers";
    79             this.grpUsers.Size = new System.Drawing.Size(1100, 249);
    80             this.grpUsers.TabIndex = 0;
    81             this.grpUsers.TabStop = false;
    82             this.grpUsers.Text = "Users";
     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);
     112            //
     113            // scMain
     114            //
     115            this.scMain.Dock = System.Windows.Forms.DockStyle.Fill;
     116            this.scMain.Location = new System.Drawing.Point(0, 0);
     117            this.scMain.Name = "scMain";
     118            this.scMain.Orientation = System.Windows.Forms.Orientation.Horizontal;
     119            //
     120            // scMain.Panel1
     121            //
     122            this.scMain.Panel1.Controls.Add(this.panel1);
     123            //
     124            // scMain.Panel2
     125            //
     126            this.scMain.Panel2.Controls.Add(this.tabControl1);
     127            this.scMain.Size = new System.Drawing.Size(1100, 556);
     128            this.scMain.SplitterDistance = 47;
     129            this.scMain.TabIndex = 9;
     130            //
     131            // tabControl1
     132            //
     133            this.tabControl1.Controls.Add(this.tabPage1);
     134            this.tabControl1.Controls.Add(this.tabPage2);
     135            this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
     136            this.tabControl1.Location = new System.Drawing.Point(0, 0);
     137            this.tabControl1.Name = "tabControl1";
     138            this.tabControl1.SelectedIndex = 0;
     139            this.tabControl1.Size = new System.Drawing.Size(1100, 505);
     140            this.tabControl1.TabIndex = 0;
     141            //
     142            // tabPage1
     143            //
     144            this.tabPage1.AutoScroll = true;
     145            this.tabPage1.Controls.Add(this.dgvUsers);
     146            this.tabPage1.Controls.Add(this.tabControl2);
     147            this.tabPage1.Location = new System.Drawing.Point(4, 22);
     148            this.tabPage1.Name = "tabPage1";
     149            this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
     150            this.tabPage1.Size = new System.Drawing.Size(1092, 479);
     151            this.tabPage1.TabIndex = 0;
     152            this.tabPage1.Text = "User";
     153            this.tabPage1.UseVisualStyleBackColor = true;
     154            //
     155            // tabPage2
     156            //
     157            this.tabPage2.AutoScroll = true;
     158            this.tabPage2.Controls.Add(this.dgvRoles);
     159            this.tabPage2.Controls.Add(this.tabControl3);
     160            this.tabPage2.Location = new System.Drawing.Point(4, 22);
     161            this.tabPage2.Name = "tabPage2";
     162            this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
     163            this.tabPage2.Size = new System.Drawing.Size(1092, 479);
     164            this.tabPage2.TabIndex = 1;
     165            this.tabPage2.Text = "Roles";
     166            this.tabPage2.UseVisualStyleBackColor = true;
     167            //
     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;
     212            //
     213            // tabPage6
     214            //
     215            this.tabPage6.Controls.Add(this.dataGridView2);
     216            this.tabPage6.Location = new System.Drawing.Point(4, 22);
     217            this.tabPage6.Name = "tabPage6";
     218            this.tabPage6.Padding = new System.Windows.Forms.Padding(3);
     219            this.tabPage6.Size = new System.Drawing.Size(1078, 159);
     220            this.tabPage6.TabIndex = 1;
     221            this.tabPage6.Text = "Users";
     222            this.tabPage6.UseVisualStyleBackColor = true;
    83223            //
    84224            // dgvUsers
    85225            //
    86             this.dgvUsers.AllowUserToAddRows = false;
    87             this.dgvUsers.AllowUserToDeleteRows = false;
    88             this.dgvUsers.AllowUserToResizeColumns = false;
    89             this.dgvUsers.AllowUserToResizeRows = false;
    90226            this.dgvUsers.AutoGenerateColumns = false;
    91227            this.dgvUsers.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
    92228            this.dgvUsers.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
    93             this.applicationIdDataGridViewTextBoxColumn1,
     229            this.membershipDataGridViewTextBoxColumn,
     230            this.applicationIdDataGridViewTextBoxColumn,
    94231            this.userIdDataGridViewTextBoxColumn,
    95232            this.userNameDataGridViewTextBoxColumn,
     
    100237            this.dgvUsers.DataSource = this.bsUsers;
    101238            this.dgvUsers.Dock = System.Windows.Forms.DockStyle.Fill;
    102             this.dgvUsers.Location = new System.Drawing.Point(3, 16);
    103             this.dgvUsers.MultiSelect = false;
     239            this.dgvUsers.Location = new System.Drawing.Point(3, 3);
    104240            this.dgvUsers.Name = "dgvUsers";
    105             this.dgvUsers.ReadOnly = true;
    106             this.dgvUsers.ShowCellErrors = false;
    107             this.dgvUsers.ShowCellToolTips = false;
    108             this.dgvUsers.ShowEditingIcon = false;
    109             this.dgvUsers.ShowRowErrors = false;
    110             this.dgvUsers.Size = new System.Drawing.Size(1094, 230);
    111             this.dgvUsers.TabIndex = 0;
    112             //
    113             // btnUserNew
    114             //
    115             this.btnUserNew.Location = new System.Drawing.Point(3, 3);
    116             this.btnUserNew.Name = "btnUserNew";
    117             this.btnUserNew.Size = new System.Drawing.Size(75, 23);
    118             this.btnUserNew.TabIndex = 1;
    119             this.btnUserNew.Text = "New";
    120             this.btnUserNew.UseVisualStyleBackColor = true;
    121             this.btnUserNew.Click += new System.EventHandler(this.btnUserNew_Click);
    122             //
    123             // btnUserModify
    124             //
    125             this.btnUserModify.Location = new System.Drawing.Point(84, 3);
    126             this.btnUserModify.Name = "btnUserModify";
    127             this.btnUserModify.Size = new System.Drawing.Size(75, 23);
    128             this.btnUserModify.TabIndex = 2;
    129             this.btnUserModify.Text = "Modify";
    130             this.btnUserModify.UseVisualStyleBackColor = true;
    131             this.btnUserModify.Click += new System.EventHandler(this.btnUserModify_Click);
    132             //
    133             // btnUserDelete
    134             //
    135             this.btnUserDelete.Location = new System.Drawing.Point(165, 3);
    136             this.btnUserDelete.Name = "btnUserDelete";
    137             this.btnUserDelete.Size = new System.Drawing.Size(75, 23);
    138             this.btnUserDelete.TabIndex = 3;
    139             this.btnUserDelete.Text = "Delete";
    140             this.btnUserDelete.UseVisualStyleBackColor = true;
    141             this.btnUserDelete.Click += new System.EventHandler(this.btnUserDelete_Click);
    142             //
    143             // grpRoles
    144             //
    145             this.grpRoles.Controls.Add(this.dgvRoles);
    146             this.grpRoles.Dock = System.Windows.Forms.DockStyle.Fill;
    147             this.grpRoles.Location = new System.Drawing.Point(0, 0);
    148             this.grpRoles.Name = "grpRoles";
    149             this.grpRoles.Size = new System.Drawing.Size(1100, 243);
    150             this.grpRoles.TabIndex = 5;
    151             this.grpRoles.TabStop = false;
    152             this.grpRoles.Text = "Roles";
     241            this.dgvUsers.Size = new System.Drawing.Size(1086, 288);
     242            this.dgvUsers.TabIndex = 1;
    153243            //
    154244            // dgvRoles
     
    156246            this.dgvRoles.AllowUserToAddRows = false;
    157247            this.dgvRoles.AllowUserToDeleteRows = false;
    158             this.dgvRoles.AllowUserToResizeColumns = false;
    159             this.dgvRoles.AllowUserToResizeRows = false;
    160248            this.dgvRoles.AutoGenerateColumns = false;
    161249            this.dgvRoles.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
    162250            this.dgvRoles.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
    163             this.applicationIdDataGridViewTextBoxColumn,
    164             this.RoleId,
    165             this.RoleName,
    166             this.LoweredRoleName,
    167             this.Description});
     251            this.roleIdDataGridViewTextBoxColumn,
     252            this.roleNameDataGridViewTextBoxColumn,
     253            this.loweredRoleNameDataGridViewTextBoxColumn,
     254            this.descriptionDataGridViewTextBoxColumn});
    168255            this.dgvRoles.DataSource = this.bsRoles;
    169256            this.dgvRoles.Dock = System.Windows.Forms.DockStyle.Fill;
    170             this.dgvRoles.Location = new System.Drawing.Point(3, 16);
     257            this.dgvRoles.Location = new System.Drawing.Point(3, 3);
    171258            this.dgvRoles.MultiSelect = false;
    172259            this.dgvRoles.Name = "dgvRoles";
    173             this.dgvRoles.ReadOnly = true;
    174             this.dgvRoles.Size = new System.Drawing.Size(1094, 224);
    175             this.dgvRoles.TabIndex = 1;
    176             //
    177             // btnRoleNew
    178             //
    179             this.btnRoleNew.Location = new System.Drawing.Point(3, 3);
    180             this.btnRoleNew.Name = "btnRoleNew";
    181             this.btnRoleNew.Size = new System.Drawing.Size(75, 23);
    182             this.btnRoleNew.TabIndex = 6;
    183             this.btnRoleNew.Text = "New";
    184             this.btnRoleNew.UseVisualStyleBackColor = true;
    185             this.btnRoleNew.Click += new System.EventHandler(this.btnRoleNew_Click);
    186             //
    187             // btnRoleModify
    188             //
    189             this.btnRoleModify.Location = new System.Drawing.Point(84, 3);
    190             this.btnRoleModify.Name = "btnRoleModify";
    191             this.btnRoleModify.Size = new System.Drawing.Size(75, 23);
    192             this.btnRoleModify.TabIndex = 7;
    193             this.btnRoleModify.Text = "Modify";
    194             this.btnRoleModify.UseVisualStyleBackColor = true;
    195             this.btnRoleModify.Click += new System.EventHandler(this.btnRoleModify_Click);
    196             //
    197             // btnRoleDelete
    198             //
    199             this.btnRoleDelete.Location = new System.Drawing.Point(165, 3);
    200             this.btnRoleDelete.Name = "btnRoleDelete";
    201             this.btnRoleDelete.Size = new System.Drawing.Size(75, 23);
    202             this.btnRoleDelete.TabIndex = 8;
    203             this.btnRoleDelete.Text = "Delete";
    204             this.btnRoleDelete.UseVisualStyleBackColor = true;
    205             this.btnRoleDelete.Click += new System.EventHandler(this.btnRoleDelete_Click);
    206             //
    207             // scMain
    208             //
    209             this.scMain.Dock = System.Windows.Forms.DockStyle.Fill;
    210             this.scMain.Location = new System.Drawing.Point(0, 0);
    211             this.scMain.Name = "scMain";
    212             this.scMain.Orientation = System.Windows.Forms.Orientation.Horizontal;
    213             //
    214             // scMain.Panel1
    215             //
    216             this.scMain.Panel1.Controls.Add(this.grpUsers);
    217             this.scMain.Panel1.Controls.Add(this.panel1);
    218             //
    219             // scMain.Panel2
    220             //
    221             this.scMain.Panel2.Controls.Add(this.grpRoles);
    222             this.scMain.Panel2.Controls.Add(this.panel2);
    223             this.scMain.Size = new System.Drawing.Size(1100, 556);
    224             this.scMain.SplitterDistance = 278;
    225             this.scMain.TabIndex = 9;
     260            this.dgvRoles.Size = new System.Drawing.Size(1086, 288);
     261            this.dgvRoles.TabIndex = 2;
    226262            //
    227263            // panel1
    228264            //
    229             this.panel1.Controls.Add(this.btnUserNew);
    230             this.panel1.Controls.Add(this.btnUserDelete);
    231             this.panel1.Controls.Add(this.btnUserModify);
    232             this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
    233             this.panel1.Location = new System.Drawing.Point(0, 249);
     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);
    234268            this.panel1.Name = "panel1";
    235             this.panel1.Size = new System.Drawing.Size(1100, 29);
    236             this.panel1.TabIndex = 4;
    237             //
    238             // panel2
    239             //
    240             this.panel2.Controls.Add(this.btnRoleNew);
    241             this.panel2.Controls.Add(this.btnRoleModify);
    242             this.panel2.Controls.Add(this.btnRoleDelete);
    243             this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
    244             this.panel2.Location = new System.Drawing.Point(0, 243);
    245             this.panel2.Name = "panel2";
    246             this.panel2.Size = new System.Drawing.Size(1100, 31);
    247             this.panel2.TabIndex = 9;
    248             //
    249             // applicationIdDataGridViewTextBoxColumn1
    250             //
    251             this.applicationIdDataGridViewTextBoxColumn1.DataPropertyName = "ApplicationId";
    252             this.applicationIdDataGridViewTextBoxColumn1.HeaderText = "ApplicationId";
    253             this.applicationIdDataGridViewTextBoxColumn1.Name = "applicationIdDataGridViewTextBoxColumn1";
     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";
    254294            //
    255295            // userIdDataGridViewTextBoxColumn
     
    289329            this.lastActivityDateDataGridViewTextBoxColumn.Name = "lastActivityDateDataGridViewTextBoxColumn";
    290330            //
    291             // bsUsers
    292             //
    293             this.bsUsers.DataSource = typeof(HeuristicLab.Services.Authentication.DataTransfer.User);
    294             //
    295             // bsRoles
    296             //
    297             this.bsRoles.DataSource = typeof(HeuristicLab.Services.Authentication.DataTransfer.Role);
    298             //
    299             // applicationIdDataGridViewTextBoxColumn
    300             //
    301             this.applicationIdDataGridViewTextBoxColumn.DataPropertyName = "ApplicationId";
    302             this.applicationIdDataGridViewTextBoxColumn.HeaderText = "ApplicationId";
    303             this.applicationIdDataGridViewTextBoxColumn.Name = "applicationIdDataGridViewTextBoxColumn";
    304             this.applicationIdDataGridViewTextBoxColumn.ReadOnly = true;
    305             //
    306             // RoleId
    307             //
    308             this.RoleId.DataPropertyName = "RoleId";
    309             this.RoleId.HeaderText = "RoleId";
    310             this.RoleId.Name = "RoleId";
    311             this.RoleId.ReadOnly = true;
    312             //
    313             // RoleName
    314             //
    315             this.RoleName.DataPropertyName = "RoleName";
    316             this.RoleName.HeaderText = "RoleName";
    317             this.RoleName.Name = "RoleName";
    318             this.RoleName.ReadOnly = true;
    319             //
    320             // LoweredRoleName
    321             //
    322             this.LoweredRoleName.DataPropertyName = "LoweredRoleName";
    323             this.LoweredRoleName.HeaderText = "LoweredRoleName";
    324             this.LoweredRoleName.Name = "LoweredRoleName";
    325             this.LoweredRoleName.ReadOnly = true;
    326             //
    327             // Description
    328             //
    329             this.Description.DataPropertyName = "Description";
    330             this.Description.HeaderText = "Description";
    331             this.Description.Name = "Description";
    332             this.Description.ReadOnly = true;
     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;
    333524            //
    334525            // UserManagement
     
    340531            this.Name = "UserManagement";
    341532            this.Text = "UserManagement";
    342             this.grpUsers.ResumeLayout(false);
    343             ((System.ComponentModel.ISupportInitialize)(this.dgvUsers)).EndInit();
    344             this.grpRoles.ResumeLayout(false);
    345             ((System.ComponentModel.ISupportInitialize)(this.dgvRoles)).EndInit();
     533            ((System.ComponentModel.ISupportInitialize)(this.bsUsers)).EndInit();
     534            ((System.ComponentModel.ISupportInitialize)(this.bsRoles)).EndInit();
    346535            this.scMain.Panel1.ResumeLayout(false);
    347536            this.scMain.Panel2.ResumeLayout(false);
    348537            ((System.ComponentModel.ISupportInitialize)(this.scMain)).EndInit();
    349538            this.scMain.ResumeLayout(false);
     539            this.tabControl1.ResumeLayout(false);
     540            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);
     548            ((System.ComponentModel.ISupportInitialize)(this.dgvUsers)).EndInit();
     549            ((System.ComponentModel.ISupportInitialize)(this.dgvRoles)).EndInit();
    350550            this.panel1.ResumeLayout(false);
    351             this.panel2.ResumeLayout(false);
    352             ((System.ComponentModel.ISupportInitialize)(this.bsUsers)).EndInit();
    353             ((System.ComponentModel.ISupportInitialize)(this.bsRoles)).EndInit();
     551            this.tabPage3.ResumeLayout(false);
     552            this.tabPage3.PerformLayout();
     553            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
     554            ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).EndInit();
    354555            this.ResumeLayout(false);
    355556
     
    358559        #endregion
    359560
    360         private System.Windows.Forms.GroupBox grpUsers;
    361         private System.Windows.Forms.DataGridView dgvUsers;
    362         private System.Windows.Forms.Button btnUserNew;
    363         private System.Windows.Forms.Button btnUserModify;
    364         private System.Windows.Forms.Button btnUserDelete;
    365         private System.Windows.Forms.GroupBox grpRoles;
    366         private System.Windows.Forms.DataGridView dgvRoles;
    367         private System.Windows.Forms.Button btnRoleNew;
    368         private System.Windows.Forms.Button btnRoleModify;
    369         private System.Windows.Forms.Button btnRoleDelete;
    370561        private System.Windows.Forms.BindingSource bsUsers;
    371562        private System.Windows.Forms.BindingSource bsRoles;
    372         private System.Windows.Forms.DataGridViewTextBoxColumn applicationIdDataGridViewTextBoxColumn1;
     563        private System.Windows.Forms.SplitContainer scMain;
     564        private System.Windows.Forms.TabControl tabControl1;
     565        private System.Windows.Forms.TabPage tabPage1;
     566        private System.Windows.Forms.DataGridView dgvUsers;
     567        private System.Windows.Forms.TabControl tabControl2;
     568        private System.Windows.Forms.TabPage tabPage4;
     569        private System.Windows.Forms.TabPage tabPage2;
     570        private System.Windows.Forms.DataGridView dgvRoles;
     571        private System.Windows.Forms.TabControl tabControl3;
     572        private System.Windows.Forms.TabPage tabPage5;
     573        private System.Windows.Forms.TabPage tabPage6;
     574        private System.Windows.Forms.Panel panel1;
     575        private System.Windows.Forms.Label label1;
     576        private System.Windows.Forms.DataGridViewTextBoxColumn membershipDataGridViewTextBoxColumn;
     577        private System.Windows.Forms.DataGridViewTextBoxColumn applicationIdDataGridViewTextBoxColumn;
    373578        private System.Windows.Forms.DataGridViewTextBoxColumn userIdDataGridViewTextBoxColumn;
    374579        private System.Windows.Forms.DataGridViewTextBoxColumn userNameDataGridViewTextBoxColumn;
     
    377582        private System.Windows.Forms.DataGridViewCheckBoxColumn isAnonymousDataGridViewCheckBoxColumn;
    378583        private System.Windows.Forms.DataGridViewTextBoxColumn lastActivityDateDataGridViewTextBoxColumn;
    379         private System.Windows.Forms.SplitContainer scMain;
    380         private System.Windows.Forms.Panel panel1;
    381         private System.Windows.Forms.Panel panel2;
    382         private System.Windows.Forms.DataGridViewTextBoxColumn applicationIdDataGridViewTextBoxColumn;
    383         private System.Windows.Forms.DataGridViewTextBoxColumn RoleId;
    384         private System.Windows.Forms.DataGridViewTextBoxColumn RoleName;
    385         private System.Windows.Forms.DataGridViewTextBoxColumn LoweredRoleName;
    386         private System.Windows.Forms.DataGridViewTextBoxColumn Description;
     584        private System.Windows.Forms.TabPage tabPage3;
     585        private System.Windows.Forms.TextBox emailTextBox;
     586        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;
     593        private System.Windows.Forms.DataGridViewTextBoxColumn roleNameDataGridViewTextBoxColumn;
     594        private System.Windows.Forms.DataGridViewTextBoxColumn loweredRoleNameDataGridViewTextBoxColumn;
     595        private System.Windows.Forms.DataGridViewTextBoxColumn descriptionDataGridViewTextBoxColumn;
     596        private System.Windows.Forms.TextBox roleNameTextBox;
     597        private System.Windows.Forms.DataGridView dataGridView2;
    387598    }
    388599}
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/UserManagement.cs

    r4590 r4647  
    1515
    1616        AuthenticationService service;
     17        Guid applicationId = new Guid("04371D20-8FD4-4607-A632-42C8D186786B");
    1718
    1819        public UserManagement()
     
    2122            Initialize();
    2223        }
     24
     25
    2326        private void Initialize()
    2427        {
     
    2629            if (service != null)
    2730            {
    28                 this.bsRoles.DataSource = service.GetRoles();
    29                 this.bsUsers.DataSource = service.GetUsers();
     31                this.bsRoles.DataSource = service.GetRoles(applicationId);
     32                this.bsUsers.DataSource = service.GetUsers(applicationId);
    3033
    3134            }
    3235        }
    3336
    34         private void btnUserNew_Click(object sender, EventArgs e)
    35         {
    36             UserDetail frmUserDetail = new UserDetail(UserDetailMode.Insert, service);
    37             frmUserDetail.Show(this);
    38         }
    39 
    40 
    41         private void btnUserModify_Click(object sender, EventArgs e)
    42         {
    43 
    44            
    45             if (dgvUsers.SelectedRows.Count == 1)
    46             {
    47                 User user = (User)dgvUsers.SelectedRows[0].DataBoundItem;
    48                 if (user != null)
    49                 {
    50                    
    51                     UserDetail frmUserDetail = new UserDetail(UserDetailMode.Update,service);
    52                     frmUserDetail.Show(this);
    53                     frmUserDetail.Initialize(user);
    54                 }
    55             }
    56         }
    57 
    58         private void btnUserDelete_Click(object sender, EventArgs e)
    59         {
    60             if (dgvUsers.SelectedRows.Count == 1)
    61             {
    62                 User user = (User)dgvUsers.SelectedRows[0].DataBoundItem;
    63                 if (user != null)
    64                 {
    65                     service.DeleteUser(user.UserId);
    66                 }
    67             }
    68         }
    69 
    70         private void btnRoleNew_Click(object sender, EventArgs e)
    71         {
    72             RoleDetail frmRoleDetail = new RoleDetail(RoleDetailMode.Insert, service,null);
    73             frmRoleDetail.Show(this);
    74         }         
    75 
    76         private void btnRoleModify_Click(object sender, EventArgs e)
    77         {
    78             if (dgvRoles.SelectedRows.Count == 1)
    79             {
    80                 Role role = (Role)dgvRoles.SelectedRows[0].DataBoundItem;
    81                 if (role != null)
    82                 {
    83 
    84                     RoleDetail frmRoleDetail = new RoleDetail(RoleDetailMode.Update, service, role);
    85                     frmRoleDetail.Show(this);
    86                  
    87                 }
    88             }
    89         }
    90 
    91         private void btnRoleDelete_Click(object sender, EventArgs e)
    92         {
    93             if (dgvRoles.SelectedRows.Count == 1)
    94             {
    95                 Role role = (Role)dgvRoles.SelectedRows[0].DataBoundItem;
    96                 if (role != null)
    97                 {
    98                     service.DeleteRole(role.RoleId);
    99                 }
    100             }
    101         }
     37   
    10238
    10339 
  • branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/UserManagement.resx

    r4590 r4647  
    121121    <value>17, 17</value>
    122122  </metadata>
    123   <metadata name="RoleId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    124     <value>True</value>
    125   </metadata>
    126   <metadata name="RoleName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    127     <value>True</value>
    128   </metadata>
    129   <metadata name="LoweredRoleName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    130     <value>True</value>
    131   </metadata>
    132   <metadata name="Description.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    133     <value>True</value>
    134   </metadata>
    135123  <metadata name="bsRoles.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    136124    <value>154, 17</value>
    137125  </metadata>
     126  <metadata name="roleNameLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     127    <value>False</value>
     128  </metadata>
     129  <metadata name="emailLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     130    <value>False</value>
     131  </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">
     139    <value>False</value>
     140  </metadata>
     141  <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">
     154    <value>False</value>
     155  </metadata>
     156  <metadata name="passwordQuestionLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     157    <value>False</value>
     158  </metadata>
     159  <metadata name="passwordSaltLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     160    <value>False</value>
     161  </metadata>
     162  <metadata name="emailLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     163    <value>False</value>
     164  </metadata>
     165  <metadata name="roleNameLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     166    <value>False</value>
     167  </metadata>
    138168</root>
  • branches/UserManagement/HeuristicLab.Services.Authentication/AuthenticationService.cs

    r4590 r4647  
    66using HeuristicLab.Services.Authentication.DataAccess;
    77using System.Data.Linq;
     8using System.Diagnostics;
    89
    910namespace HeuristicLab.Services.Authentication
     
    1617        public DataTransfer.User GetUser(Guid id)
    1718        {
    18 
    19             using (UserManagementDataContext db = new UserManagementDataContext())
    20             {
    21                 Table<aspnet_User> UserTable = db.GetTable<aspnet_User>();
    22 
    23                 var User = from item in UserTable
    24                            where item.UserId == id
    25                           select item;
    26                return Convert.ToDataTransfer((aspnet_User)User);
    27             }
    28          
     19            using (UserManagementDataContext db = new UserManagementDataContext())
     20            {
     21                try
     22                {
     23                    Table<aspnet_User> UserTable = db.GetTable<aspnet_User>();
     24
     25                    var User = from item in UserTable
     26                               where item.UserId == id
     27                               select item;
     28                    User user = Convert.ToDataTransfer((aspnet_User)User.Single());
     29
     30                    if (user == null) { return null; }
     31
     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());
     39
     40                    if (membership == null) { return null; }
     41                    user.Membership = membership;
     42
     43                    return user;
     44
     45
     46                }
     47                catch (Exception ex)
     48                {
     49                    Debug.WriteLine(ex.InnerException);
     50                    return null;
     51                }
     52            }
     53        }
     54
     55        public DataTransfer.User GetUser(Guid applicationId, string userName)
     56        {
     57            using (UserManagementDataContext db = new UserManagementDataContext())
     58            {
     59                try
     60                {
     61                    Table<aspnet_User> UserTable = db.GetTable<aspnet_User>();
     62
     63                    var User = from item in UserTable
     64                               where item.UserName == userName && item.ApplicationId == applicationId
     65                               select item;
     66
     67                    User user = Convert.ToDataTransfer((aspnet_User)User.Single());
     68
     69                    if (user == null) { return null; }
     70
     71                    Table<aspnet_Membership> MembershipTable = db.GetTable<aspnet_Membership>();
     72
     73                    var Membership = from item in MembershipTable
     74                                     where item.UserId == user.UserId
     75                                     select item;
     76
     77                    Membership membership = Convert.ToDataTransfer((aspnet_Membership)Membership.Single());
     78
     79                    if (membership == null) { return null; }
     80                    user.Membership = membership;
     81
     82                    return user;
     83
     84
     85
     86
     87                }
     88                catch (Exception ex)
     89                {
     90                    Debug.WriteLine(ex.InnerException);
     91                    return null;
     92                }
     93               }
     94        }
     95
     96        public IEnumerable<DataTransfer.User> GetUsers(Guid applicationId)
     97        {
     98            List<DataTransfer.User> UserList = new List<DataTransfer.User>();
     99            using (UserManagementDataContext db = new UserManagementDataContext())
     100            {
     101                try
     102                {
     103                    Table<aspnet_User> UserTable = db.GetTable<aspnet_User>();
     104                    var Users = from item in UserTable
     105                                where item.ApplicationId == applicationId
     106                                select item;
     107                    foreach (var eUser in Users)
     108                    {
     109
     110                        User user = Convert.ToDataTransfer(eUser);
     111
     112                        if (user== null) { return null; }
     113
     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());
     121
     122                        if (membership == null) { return null; }
     123                        user.Membership = membership;
     124
     125                        UserList.Add(user);
     126                    }
     127                }
     128                catch (Exception ex)
     129                {
     130                    Debug.WriteLine(ex.InnerException);
     131                    return new List<User>();
     132                }
     133            }
     134
     135            return UserList;
     136        }
     137        public bool InsertUser(User user)
     138        {
     139            if (user != null)
     140            {
     141                using (UserManagementDataContext db = new UserManagementDataContext())
     142                {
     143                    try
     144                    {
     145
     146                        Guid? userId = null;
     147                        Application application = GetApplication(user.ApplicationId);
     148                        if(application == null){return false;}
     149                        if (user.Membership == null) { return false; }
     150   
     151                        int? passwordFormat = 1;
     152                        int? uniqueEmail = null;
     153                        int result = db.aspnet_Membership_CreateUser(application.ApplicationName, user.UserName, user.Membership.Password, user.Membership.PasswordSalt, user.Membership.Email, user.Membership.PasswordQuestion, user.Membership.PasswordAnswer, user.Membership.IsApproved, DateTime.UtcNow, DateTime.Now, uniqueEmail, passwordFormat, ref userId);
     154                                                   
     155                        if (result != 0)
     156                        {
     157                            return false;
     158                        }
     159
     160                        if (userId != null)
     161                        {
     162                            return true;
     163                        }
     164                        else
     165                        {
     166                            return false;
     167                        }
     168                    }
     169                    catch (Exception ex)
     170                    {
     171                        Debug.WriteLine(ex.InnerException);
     172                        return false;
     173                    }
     174                }
     175           
     176            }
     177            return false;
     178        }
     179        public bool DeleteUser(Guid id)
     180        {
     181
     182            User user = GetUser(id);
     183            if (user != null)
     184            {
     185
     186                using (UserManagementDataContext db = new UserManagementDataContext())
     187                {
     188                    try
     189                    {
     190                        Application application = GetApplication(user.ApplicationId);
     191                        if (application == null)
     192                        {
     193                            return false;
     194                        }
     195
     196                        int? tablesToDeleteFrom = 99;
     197                        int? numTablesDeletedFrom = null;
     198                        db.aspnet_Users_DeleteUser(application.ApplicationName, user.UserName, tablesToDeleteFrom, ref numTablesDeletedFrom);
     199                       
     200                        if (numTablesDeletedFrom != null)
     201                        {
     202                            return true;
     203                        }
     204                        else
     205                        {
     206                            return false;
     207                        }
     208                    }
     209                    catch (Exception ex)
     210                    {
     211                        Debug.WriteLine(ex.InnerException);
     212                        return false;
     213                    }
     214                }
     215            }
     216            return false;
     217        }
     218
     219        public bool UpdateUser(User user)
     220        {
     221           
     222            if (user != null)
     223            {
     224
     225                using (UserManagementDataContext db = new UserManagementDataContext())
     226                {
     227                    try
     228                    {
     229                        if (user.Membership == null)
     230                        {
     231                            return false;
     232                        }
     233
     234                        Table<aspnet_User> UserTable = db.GetTable<aspnet_User>();
     235
     236                        var User = from item in UserTable
     237                                   where item.UserId == user.UserId
     238                                   select item;
     239                       aspnet_User eUser = ((aspnet_User)User.Single());
     240
     241
     242                       Table<aspnet_Membership> MembershipTable = db.GetTable<aspnet_Membership>();
     243
     244                       var Membership = from item in MembershipTable
     245                                        where item.UserId == user.UserId
     246                                        select item;
     247
     248                       aspnet_Membership eMembership = ((aspnet_Membership)Membership.Single());
     249
     250                        Convert.ToEntity(user, eUser);
     251                       
     252                        Convert.ToEntity(user.Membership, eMembership);
     253                        if (eUser == null)
     254                        {
     255                           return false;
     256                        }
     257                        if (eMembership == null)
     258                        {
     259                            return false;
     260                        }
     261                        db.SubmitChanges();
     262                    }
     263                    catch (Exception ex)
     264                    {
     265                        Debug.WriteLine(ex.InnerException);
     266                        return false;
     267                    }
     268                }
     269            } return false;
     270        }
     271
     272        #endregion
     273
     274
     275        #region Role
     276
     277        public Role GetRole(Guid id)
     278        {
     279            using (UserManagementDataContext db = new UserManagementDataContext())
     280            {
     281                try
     282                {
     283                    Table<aspnet_Role> RoleTable = db.GetTable<aspnet_Role>();
     284
     285                    var Role = from item in RoleTable
     286                               where item.RoleId == id
     287                               select item;
     288                    return Convert.ToDataTransfer((aspnet_Role)Role.Single());
     289                }
     290                catch (Exception ex)
     291                {
     292                    Debug.WriteLine(ex.InnerException);
     293                    return null;
     294                }
     295            }
     296        }
     297
     298        public Role GetRole(Guid applicationId, string roleName)
     299        {
     300            using (UserManagementDataContext db = new UserManagementDataContext())
     301            {
     302                try
     303                {
     304                    Table<aspnet_Role> RoleTable = db.GetTable<aspnet_Role>();
     305
     306                    var Role = from item in RoleTable
     307                               where item.RoleName == roleName && item.ApplicationId == applicationId
     308                               select item;
     309                    return Convert.ToDataTransfer((aspnet_Role)Role.Single());
     310                }
     311                catch (Exception ex)
     312                {
     313                    Debug.WriteLine(ex.InnerException);
     314                    return null;
     315                }
     316            }
     317        }
     318
     319        public bool RoleExists(Guid roleId)
     320        {
     321            if (roleId != null)
     322            {
     323                using (UserManagementDataContext db = new UserManagementDataContext())
     324                {
     325                    try
     326                    {
     327                        Role role = GetRole(roleId);
     328                        if (role == null)
     329                        {
     330                            return false;
     331                        }
     332                        Application application = GetApplication(role.ApplicationId);
     333                        if (application == null)
     334                        {
     335                            return false;
     336                        }
     337
     338                        int result = db.aspnet_Roles_RoleExists(application.ApplicationName, role.RoleName);
     339                       
     340                        return (result == 0);
     341                    }
     342                    catch (Exception ex)
     343                    {
     344                        Debug.Write(ex.InnerException);
     345                        return false;
     346                    }
     347                }
     348
     349            } return false;
     350        }
     351
     352        public IEnumerable<Role> GetRoles(Guid applicationId)
     353        {
     354            List<Role> RoleList = new List<Role>();
     355
     356            using (UserManagementDataContext db = new UserManagementDataContext())
     357            {
     358                try
     359                {
     360                   // db.aspnet_Roles_GetAllRoles(applicationName);
     361                    Table<aspnet_Role> RoleTable = db.GetTable<aspnet_Role>();
     362
     363                    var Roles = from item in RoleTable
     364                                where item.ApplicationId == applicationId
     365                                select item;
     366                    foreach (var Role in Roles)
     367                    {
     368                        RoleList.Add(Convert.ToDataTransfer((aspnet_Role)Role));
     369                    }
     370                }
     371                catch (Exception ex)
     372                {
     373                    Debug.WriteLine(ex.InnerException);
     374                    return new List<Role>();
     375                }
     376            }
     377
     378            return RoleList;
     379        }
     380       
     381        public bool InsertRole(Role role)
     382        {
     383            if (role != null)
     384            {
     385                using (UserManagementDataContext db = new UserManagementDataContext())
     386                {
     387                    try
     388                    {
     389                        Application application = GetApplication(role.ApplicationId);
     390                        if (application == null)
     391                        {
     392                            return false;
     393                        }
     394                        int result = db.aspnet_Roles_CreateRole(application.ApplicationName, role.RoleName);
     395                       
     396                        return (result == 0); // checken, welchen rückgabewert (in db, procedure)
     397                     
     398                    }
     399                    catch (Exception ex)
     400                    {
     401                        Debug.WriteLine(ex.InnerException);
     402                        return false;
     403                    }
     404                }
     405             
     406            }
     407            return false;
     408        }
     409        public bool UpdateRole(Role role)
     410        {
     411
     412            if (role != null)
     413            {
     414
     415                using (UserManagementDataContext db = new UserManagementDataContext())
     416                {
     417                    try
     418                    {
     419
     420                        Table<aspnet_Role> RoleTable = db.GetTable<aspnet_Role>();
     421
     422                        var Role = from item in RoleTable
     423                                   where item.RoleId == role.RoleId
     424                                   select item;
     425                        aspnet_Role eRole = ((aspnet_Role)Role.Single());
     426
     427
     428                        Convert.ToEntity(role, eRole);
     429
     430                        if (eRole != null)
     431                        {
     432                            db.SubmitChanges();
     433                        }
     434                        else
     435                        {
     436                            return false;
     437                        }
     438                    }
     439                    catch (Exception ex)
     440                    {
     441                        Debug.WriteLine(ex.InnerException);
     442                        return false;
     443                    }
     444                }
     445            } return false;
     446        }
     447
     448        public bool DeleteRole(Guid id)
     449        {
     450            if (id != null)
     451            {
     452                using (UserManagementDataContext db = new UserManagementDataContext())
     453                {
     454                    try
     455                    {
     456                        Role role = GetRole(id);
     457
     458                        bool deleteOnlyIfRoleIsEmpty = true;
     459                        if (role == null)
     460                        {
     461                            return false;
     462                        }
     463                        Application application = GetApplication(role.ApplicationId);
     464                        if (application == null)
     465                        {
     466                            return false;
     467                        }
     468                        db.aspnet_Roles_DeleteRole(application.ApplicationName, role.RoleName, deleteOnlyIfRoleIsEmpty);
     469
     470                     
     471
     472                        return true;
     473                    }
     474                    catch (Exception ex)
     475                    {
     476                        Debug.WriteLine(ex.InnerException);
     477                        return false;
     478                    }
     479                }
     480             
     481            }
     482            return false;
     483        }
     484
     485        public bool IsUserInRole(Guid roleId, Guid userId)
     486        {
     487            if (roleId != null && userId != null)
     488            {
     489                using (UserManagementDataContext db = new UserManagementDataContext())
     490                {
     491
     492                    try
     493                    {
     494                        User user = GetUser(userId);
     495                        if (user == null) { return false; }
     496
     497                        Application application = GetApplication(user.ApplicationId);
     498                        if (application == null) { return false; }
     499
     500                        Role role = GetRole(roleId);
     501                        if (role == null) { return false; }
     502
     503                        int result = db.aspnet_UsersInRoles_IsUserInRole(application.ApplicationName, user.UserName, role.RoleName);
     504                       
     505                        return (result == 0);
     506                    }
     507                    catch (Exception ex)
     508                    {
     509                        Debug.WriteLine(ex.InnerException);
     510                        return false;
     511
     512                    }
     513
     514                }
     515
     516            } return false;
     517        }
     518
     519        public bool AddUserToRole(Guid roleId, Guid userId)
     520        {
     521            using (UserManagementDataContext db = new UserManagementDataContext())
     522            {
     523                try
     524                {
     525                    Role role = GetRole(roleId);
     526                    if (role == null)
     527                    {
     528                        return false;
     529                    }
     530                    Application application = GetApplication(role.ApplicationId);
     531                    if (application == null)
     532                    {
     533                        return false;
     534                    }
     535                    User user = GetUser(userId);
     536                    if (user == null)
     537                    {
     538                        return false;
     539                    }
     540
     541                    db.aspnet_UsersInRoles_AddUsersToRoles(application.ApplicationName, user.UserName, role.RoleName,DateTime.Now);
     542                    return true;
     543                }
     544                catch (Exception ex)
     545                {
     546                    Debug.WriteLine(ex.InnerException);
     547                    return false;
     548                }
     549            }
     550       
     551        }
     552        public bool RemoveUserFromRole(Guid roleId, Guid userId)
     553        {
     554            using (UserManagementDataContext db = new UserManagementDataContext())
     555            {
     556                try
     557                {
     558                    Role role = GetRole(roleId);
     559                    if (role == null)
     560                    {
     561                        return false;
     562                    }
     563                    Application application = GetApplication(role.ApplicationId);
     564                    if (application == null)
     565                    {
     566                        return false;
     567                    }
     568                    User user = GetUser(userId);
     569                    if (user == null)
     570                    {
     571                        return false;
     572                    }
     573
     574                   db.aspnet_UsersInRoles_RemoveUsersFromRoles(application.ApplicationName, user.UserName, role.RoleName);
     575                    return true;
     576                   
     577                }
     578                catch (Exception ex)
     579                {
     580                    Debug.WriteLine(ex.InnerException);
     581                    return false;
     582                }
     583            }
     584           
     585        }
     586        public IEnumerable<Role> GetRolesForUser(Guid userId)
     587        {
     588            List<Role> roles = new List<Role>();
     589            using (UserManagementDataContext db = new UserManagementDataContext())
     590            {
     591                try
     592                {
     593                    User user = GetUser(userId);
     594                    if (user == null)
     595                    {
     596                        return roles;
     597                    }
     598                    Application application = GetApplication(user.ApplicationId);
     599                    if (application == null)
     600                    {
     601                        return roles;
     602                    }
     603                   
     604
     605                    ISingleResult<aspnet_UsersInRoles_GetRolesForUserResult> results = db.aspnet_UsersInRoles_GetRolesForUser(application.ApplicationName,user.UserName);
     606                    foreach (aspnet_UsersInRoles_GetRolesForUserResult userInRole in results)
     607                    {
     608                        roles.Add(GetRole(application.ApplicationId,userInRole.RoleName));
     609                    }
     610                }
     611                catch (Exception ex)
     612                {
     613                    Debug.WriteLine(ex.InnerException);
     614                    return new List<Role>();
     615                }
     616            }
    29617           
    30         }
    31         public IEnumerable<DataTransfer.User> GetUsers()
    32         {
    33             List<DataTransfer.User> UserList = new List<DataTransfer.User>();
    34 
    35             using (UserManagementDataContext db = new UserManagementDataContext())
    36             {
    37                 Table<aspnet_User> UserTable = db.GetTable<aspnet_User>();
    38 
    39                 var Users = from item in UserTable
    40                            select item;
    41                 foreach (var User in Users)
    42                 {
    43                     UserList.Add( Convert.ToDataTransfer((aspnet_User)User));
    44                 }
    45             }
    46 
    47 
    48             return UserList;
    49         }
    50         public bool InsertUser(User user)
    51         {
    52             // insert user
    53             if (user != null)
    54             {
    55                 using (UserManagementDataContext db = new UserManagementDataContext())
    56                 {
    57                     try
    58                     {
    59                         aspnet_User userDa = Convert.ToEntity(user);
    60                         db.aspnet_Users.InsertOnSubmit(userDa);
    61                         db.SubmitChanges();
    62                     }
    63                     catch (Exception e)
    64                     {
    65                         return false;
    66                     }
    67                 }
    68                 return true;
    69             }
     618            return roles;
     619        }
     620
     621        public IEnumerable<User> GetUsersInRole(Guid roleId)
     622        {
     623            List<User> users = new List<User>();
     624
     625            using(UserManagementDataContext db = new UserManagementDataContext()){
     626                try
     627                {
     628                    Role role = GetRole(roleId);
     629
     630                    if (role != null)
     631                    {
     632                        Application application = GetApplication(role.ApplicationId);
     633
     634                        if (application != null)
     635                        {
     636
     637
     638                            ISingleResult<aspnet_UsersInRoles_GetUsersInRolesResult> result = db.aspnet_UsersInRoles_GetUsersInRoles(application.ApplicationName, role.RoleName);
     639                            foreach (aspnet_UsersInRoles_GetUsersInRolesResult usersInRole in result)
     640                            {
     641                                users.Add(GetUser(application.ApplicationId,usersInRole.UserName));
     642                            }
     643                        }
     644                    }
     645                }
     646                catch (Exception ex)
     647                {
     648                    Debug.WriteLine(ex.InnerException);
     649                    return new List<User>();
     650                }
     651            }
     652
     653            return users;
     654        }
     655
     656        #endregion
     657
     658        #region Application
     659
     660        public Application InsertApplication(Application application)
     661        {
     662            if (application != null)
     663            {
     664                using (UserManagementDataContext db = new UserManagementDataContext())
     665                {
     666                    try
     667                    {
     668                        Guid? applicationId = null;
     669                        int result = db.aspnet_Applications_CreateApplication(application.ApplicationName, ref applicationId);
     670                        Console.WriteLine("result=" + result);
     671                        if (applicationId != null)
     672                        {
     673                            application.ApplicationId = (Guid)applicationId;
     674                            return application;
     675                        }
     676                        else
     677                        {
     678                            return null;
     679                        }
     680                    }
     681                    catch (Exception ex)
     682                    {
     683                        Debug.WriteLine(ex.InnerException);
     684                        return null;
     685                    }
     686                }
     687             
     688            }
     689            return null;
     690        }
     691
     692        public bool DeleteApplication(Application application)
     693        {
    70694            return false;
    71695        }
    72         public bool DeleteUser(Guid id)
    73         {
    74 
    75             return false;
    76         }
    77         public bool UpdateUser(User user)
    78         {
    79             return false;
     696
     697        public Application GetApplication(Guid id)
     698        {
     699            using (UserManagementDataContext db = new UserManagementDataContext())
     700            {
     701                try
     702                {
     703                    Table<aspnet_Application> ApplicationTable = db.GetTable<aspnet_Application>();
     704
     705                    var Application = from item in ApplicationTable
     706                                      where item.ApplicationId == id
     707                                      select item;
     708                    return Convert.ToDataTransfer((aspnet_Application)Application.Single());
     709                }
     710                catch (Exception ex)
     711                {
     712                    Debug.WriteLine(ex.InnerException);
     713                    return null;
     714                }
     715            }
    80716        }
    81717
    82718        #endregion
    83719
    84 
    85         #region Role
    86 
    87         public Role GetRole(Guid id)
    88         {
    89             Role role = new Role();
    90             // ...
    91 
    92             return role;
    93         }
    94         public IEnumerable<Role> GetRoles()
    95         {
    96             List<Role> RoleList = new List<Role>();
    97 
    98             using (UserManagementDataContext db = new UserManagementDataContext())
    99             {
    100                 Table<aspnet_Role> RoleTable = db.GetTable<aspnet_Role>();
    101 
    102                 var Roles = from item in RoleTable
    103                             select item;
    104                 foreach (var Role in Roles)
    105                 {
    106                     RoleList.Add(Convert.ToDataTransfer((aspnet_Role)Role));
    107                 }
    108             }
    109 
    110             return RoleList;
    111         }
    112         public bool InsertRole(Role role)
    113         {
    114             if (role != null)
    115             {
    116                 using (UserManagementDataContext db = new UserManagementDataContext())
    117                 {
    118                     try
    119                     {
    120                         aspnet_Role roleDa = Convert.ToEntity(role);
    121                         db.aspnet_Roles.InsertOnSubmit(roleDa);
    122                         db.SubmitChanges();
    123                     }
    124                     catch (Exception e)
    125                     {
    126                         return false;
    127                     }
    128                 }
    129                 return true;
    130             }
    131             return false;
    132         }
    133         public bool UpdateRole(Role role)
    134         {
    135             return false;
    136         }
    137         public bool DeleteRole(Guid id)
    138         {
    139             return false;
    140         }
    141         public bool AddRoleToUser(Guid roleId, Guid userId)
    142         {
    143             return false;
    144         }
    145         public bool RemoveRoleFromUser(Guid roleId, Guid userId)
    146         {
    147             return false;
    148         }
    149         public IEnumerable<Role> GetRolesForUser(Guid userId)
    150         {
    151             List<Role> roles = new List<Role>();
    152             return roles;
     720        #region Membership
     721
     722        public Membership InsertMembership(Membership membership)
     723        {
     724
     725            if (membership != null)
     726            {
     727                using (UserManagementDataContext db = new UserManagementDataContext())
     728                {
     729                    try
     730                    {
     731                        Application application = GetApplication(membership.ApplicationId);
     732                        if (application == null) { return null; }
     733
     734                    }
     735                    catch (Exception ex)
     736                    {
     737                        Debug.WriteLine(ex.InnerException);
     738                        return null;
     739                    }
     740                }
     741            }
     742            return null;
    153743        }
    154744
  • branches/UserManagement/HeuristicLab.Services.Authentication/Convert.cs

    r4590 r4647  
    139139                UserId = source.UserId,
    140140                Password = source.Password,
     141                PasswordAnswer = source.PasswordAnswer,
     142                PasswordSalt = source.PasswordSalt,
     143                PasswordQuestion = source.PasswordQuestion,
     144               
    141145                Email = source.Email,
    142146                LoweredEmail = source.LoweredEmail,
     
    149153                Comment = source.Comment
    150154
     155               
    151156            };
    152157        }
     
    165170                UserId = source.UserId,
    166171                Password = source.Password,
     172                PasswordAnswer = source.PasswordAnswer,
     173                PasswordSalt = source.PasswordSalt,
     174                PasswordQuestion = source.PasswordQuestion,
     175               
    167176                Email = source.Email,
    168177                LoweredEmail = source.LoweredEmail,
     
    189198                target.UserId = source.UserId;
    190199                target.Password = source.Password;
     200                target.PasswordAnswer = source.PasswordAnswer;
     201                target.PasswordSalt = source.PasswordSalt;
     202                target.PasswordQuestion = source.PasswordQuestion;
     203               
    191204                target.Email = source.Email;
    192205                target.LoweredEmail = source.LoweredEmail;
  • branches/UserManagement/HeuristicLab.Services.Authentication/HeuristicLab.Services.Authentication.csproj

    r4584 r4647  
    6060    </ProjectReference>
    6161  </ItemGroup>
     62  <ItemGroup>
     63    <WCFMetadata Include="Service References\" />
     64  </ItemGroup>
    6265  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    6366  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • branches/UserManagement/HeuristicLab.Services.Authentication/Interfaces/IAuthenticationService.cs

    r4590 r4647  
    1616
    1717        [OperationContract]
    18         IEnumerable<User> GetUsers();
     18        User GetUser(Guid applicationId, string userName);
     19
     20        [OperationContract]
     21        IEnumerable<User> GetUsers(Guid applicationId);
    1922
    2023        [OperationContract]
     
    2730        bool UpdateUser(User user);
    2831
     32        [OperationContract]
     33        bool AddUserToRole(Guid roleId, Guid userId);
     34
     35        [OperationContract]
     36        bool RemoveUserFromRole(Guid roleId, Guid userId);
     37
     38        [OperationContract]
     39        IEnumerable<Role> GetRolesForUser(Guid userId);
     40
    2941        #endregion
    3042
     
    3345        [OperationContract]
    3446        Role GetRole(Guid id);
     47       
     48        [OperationContract]
     49        Role GetRole(Guid applicationId, string roleName);
    3550
    3651        [OperationContract]
    37         IEnumerable<Role> GetRoles();
     52        IEnumerable<Role> GetRoles(Guid applicationId);
    3853
     54        [OperationContract]
     55        bool RoleExists(Guid roleId);
     56
     57        [OperationContract]
     58        bool IsUserInRole(Guid roleId, Guid userId);
     59       
    3960        [OperationContract]
    4061        bool InsertRole(Role role);
     
    4768
    4869        [OperationContract]
    49         bool AddRoleToUser(Guid roleId, Guid userId);
     70        IEnumerable<User> GetUsersInRole(Guid roleId);
     71       
     72        #endregion
     73
     74        #region Application
    5075
    5176        [OperationContract]
    52         bool RemoveRoleFromUser(Guid roleId, Guid userId);
     77        Application GetApplication(Guid id);
    5378
    5479        [OperationContract]
    55         IEnumerable<Role> GetRolesForUser(Guid userId);
     80        Application InsertApplication(Application application);
     81
     82        [OperationContract]
     83        bool DeleteApplication(Application application);
     84        #endregion
     85
     86        #region Membership
     87
     88        [OperationContract]
     89        Membership InsertMembership(Membership membership);
    5690
    5791        #endregion
Note: See TracChangeset for help on using the changeset viewer.