Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/18/12 16:47:59 (12 years ago)
Author:
ascheibe
Message:

#1648 some cleanups in preparation for the access service trunk integration

Location:
branches/ClientUserManagement
Files:
3 deleted
16 edited

Legend:

Unmodified
Added
Removed
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Administration/3.3/AccessAdministrationClient.cs

    r7848 r8039  
    127127      ExecuteActionAsync(StoreRoles, exceptionCallback);
    128128    }
    129 
    130     //i don't think such a generic method is a good idea
    131     /*public static void Store(IAccessItem item) {
    132      
    133     } */
    134129    #endregion
    135130
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/HeuristicLab.Clients.Access.Views-3.3.csproj

    r7611 r8039  
    106106  </ItemGroup>
    107107  <ItemGroup>
    108     <Compile Include="ClientViews\AdminClientView.cs">
    109       <SubType>UserControl</SubType>
    110     </Compile>
    111     <Compile Include="ClientViews\AdminClientView.Designer.cs">
    112       <DependentUpon>AdminClientView.cs</DependentUpon>
    113     </Compile>
    114108    <Compile Include="ClientViews\ClientInformationDialog.cs">
    115109      <SubType>Form</SubType>
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews/LightweightUserGroupSelectionView.cs

    r7555 r8039  
    6262
    6363    void Instance_Refreshed(object sender, EventArgs e) {
    64       //TODO: show loading bar
    6564      if (AccessClient.Instance.UsersAndGroups != null)
    6665        this.itemsListView.Enabled = true;
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews/RefreshableLightweightUserInformationView.cs

    r7982 r8039  
    2424
    2525namespace HeuristicLab.Clients.Access.Views {
    26 
    2726  public partial class RefreshableLightweightUserInformationView : RefreshableView {
    2827    public RefreshableLightweightUserInformationView() {
     
    6059        lightweightUserInformationView.Enabled = true;
    6160        if (!UserInformation.Instance.UserExists) {
    62           MessageBox.Show("Couldn't fetch user information from the server." + Environment.NewLine + "Please verify that you have an existing user and that your user name and password is correct. ", "HeuristicLab Access Service", MessageBoxButtons.OK, MessageBoxIcon.Error);
     61          MessageBox.Show("Couldn't fetch user information from the server." + Environment.NewLine +
     62            "Please verify that you have an existing user and that your user name and password is correct. ", "HeuristicLab Access Service", MessageBoxButtons.OK, MessageBoxIcon.Error);
    6363          lightweightUserInformationView.Content = null;
    6464        } else {
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/AccessClient.cs

    r7536 r8039  
    9090    #endregion
    9191
    92     public static void Store(IAccessItem item) {
    93       //TODO: prevent storing of lightweight users
    94     }
    95 
    9692    #region Events
    9793    public event EventHandler Refreshing;
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/ClientInformationUtils.cs

    r7553 r8039  
    3535      OperatingSystem os = new OperatingSystem();
    3636      ClientType cType = new ClientType();
    37       cType.Name = "HLClient";
     37      cType.Name = Settings.Default.ClientTypeName;
    3838
    3939      client.Id = GetUniqueMachineId();
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/ServiceClients/AccessItem.cs

    r7637 r8039  
    9393    }
    9494
    95     public void Store() {
    96       AccessClient.Store(this);
    97       Modified = false;
    98     }
    99 
    10095    protected void RaisePropertyChanged(string propertyName) {
    10196      OnPropertyChanged(new PropertyChangedEventArgs(propertyName));
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/ServiceClients/IAccessItem.cs

    r7368 r8039  
    2626namespace HeuristicLab.Clients.Access {
    2727  public interface IAccessItem : IItem, INotifyPropertyChanged {
    28     bool Modified { get; }
    29     void Store();
     28    bool Modified { get; }   
    3029    event EventHandler ModifiedChanged;
    3130  }
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/ServiceClients/LightweightUser.cs

    r7436 r8039  
    2121
    2222using System.Drawing;
     23using System.Linq;
    2324using HeuristicLab.Common;
    2425using HeuristicLab.Core;
     
    2930    protected LightweightUser(LightweightUser original, Cloner cloner)
    3031      : base(original, cloner) {
    31       FullName = original.FullName;
    32       UserName = original.UserName;
     32      this.FullName = original.FullName;
     33      this.UserName = original.UserName;
     34      this.EMail = original.EMail;
     35      this.Groups = original.Groups.Select(x => (UserGroup)x.Clone(cloner)).ToList();
     36      this.Roles = original.Roles.Select(x => (Role)x.Clone(cloner)).ToList();
    3337    }
    3438
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/Settings.Designer.cs

    r7623 r8039  
    22// <auto-generated>
    33//     This code was generated by a tool.
    4 //     Runtime Version:4.0.30319.530
     4//     Runtime Version:4.0.30319.544
    55//
    66//     Changes to this file may cause incorrect behavior and will be lost if
     
    3232            }
    3333        }
     34       
     35        [global::System.Configuration.ApplicationScopedSettingAttribute()]
     36        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     37        [global::System.Configuration.DefaultSettingValueAttribute("HLClient")]
     38        public string ClientTypeName {
     39            get {
     40                return ((string)(this["ClientTypeName"]));
     41            }
     42        }
    3443    }
    3544}
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/Settings.settings

    r7553 r8039  
    66      <Value Profile="(Default)">HeuristicLab 3.3</Value>
    77    </Setting>
     8    <Setting Name="ClientTypeName" Type="System.String" Scope="Application">
     9      <Value Profile="(Default)">HLClient</Value>
     10    </Setting>
    811  </Settings>
    912</SettingsFile>
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/app.config

    r7623 r8039  
    3939    </system.serviceModel>
    4040    <applicationSettings>
    41         <HeuristicLab.Clients.Access.Settings>
    42             <setting name="HLExeName" serializeAs="String">
    43                 <value>HeuristicLab 3.3</value>
    44             </setting>
    45         </HeuristicLab.Clients.Access.Settings>
     41      <HeuristicLab.Clients.Access.Settings>
     42        <setting name="HLExeName" serializeAs="String">
     43          <value>HeuristicLab 3.3</value>
     44        </setting>
     45        <setting name="ClientTypeName" serializeAs="String">
     46          <value>HLClient</value>
     47        </setting>
     48      </HeuristicLab.Clients.Access.Settings>
    4649    </applicationSettings>
    4750</configuration>
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/ascheibe_app.config

    r7623 r8039  
    3838        </client>
    3939    </system.serviceModel>
    40     <applicationSettings>
    41         <HeuristicLab.Clients.Access.Settings>
    42             <setting name="HLExeName" serializeAs="String">
    43                 <value>HeuristicLab 3.3</value>
    44             </setting>
    45         </HeuristicLab.Clients.Access.Settings>
    46     </applicationSettings>
     40  <applicationSettings>
     41    <HeuristicLab.Clients.Access.Settings>
     42      <setting name="HLExeName" serializeAs="String">
     43        <value>HeuristicLab 3.3</value>
     44      </setting>
     45      <setting name="ClientTypeName" serializeAs="String">
     46        <value>HLClient</value>
     47      </setting>
     48    </HeuristicLab.Clients.Access.Settings>
     49  </applicationSettings>
    4750</configuration>
  • branches/ClientUserManagement/HeuristicLab.Services.Access.sln

    r7614 r8039  
    1717EndProject
    1818Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.GeoIP", "HeuristicLab.GeoIP\1.12\HeuristicLab.GeoIP.csproj", "{BE9B0229-9150-49A4-AEA6-BB58E055992F}"
    19 EndProject
    20 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Access-3.3.Tests", "HeuristicLab.Services.Access-3.3.Tests\HeuristicLab.Services.Access-3.3.Tests.csproj", "{70C5A73A-148C-45A2-938F-F8F6DAA80A02}"
    2119EndProject
    2220Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Clients.Access.Views-3.3", "HeuristicLab.Clients.Access.Views\3.3\HeuristicLab.Clients.Access.Views-3.3.csproj", "{FE856595-64CD-46DA-9CD2-FFF3E6B0D4F2}"
     
    7775    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
    7876    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|x86.ActiveCfg = Release|Any CPU
    79     {70C5A73A-148C-45A2-938F-F8F6DAA80A02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    80     {70C5A73A-148C-45A2-938F-F8F6DAA80A02}.Debug|Any CPU.Build.0 = Debug|Any CPU
    81     {70C5A73A-148C-45A2-938F-F8F6DAA80A02}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
    82     {70C5A73A-148C-45A2-938F-F8F6DAA80A02}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
    83     {70C5A73A-148C-45A2-938F-F8F6DAA80A02}.Debug|x86.ActiveCfg = Debug|Any CPU
    84     {70C5A73A-148C-45A2-938F-F8F6DAA80A02}.Release|Any CPU.ActiveCfg = Release|Any CPU
    85     {70C5A73A-148C-45A2-938F-F8F6DAA80A02}.Release|Any CPU.Build.0 = Release|Any CPU
    86     {70C5A73A-148C-45A2-938F-F8F6DAA80A02}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
    87     {70C5A73A-148C-45A2-938F-F8F6DAA80A02}.Release|Mixed Platforms.Build.0 = Release|Any CPU
    88     {70C5A73A-148C-45A2-938F-F8F6DAA80A02}.Release|x86.ActiveCfg = Release|Any CPU
    8977    {FE856595-64CD-46DA-9CD2-FFF3E6B0D4F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    9078    {FE856595-64CD-46DA-9CD2-FFF3E6B0D4F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
  • branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/AccessService.cs

    r7982 r8039  
    473473
    474474      using (DA.AccessServiceDataContext context = new DA.AccessServiceDataContext()) {
    475         //TODO: this has to be done recursive, so check if a group is in another
    476         //group because then the user is also in this group...
    477475        var query = from g in context.UserGroupUserGroups
    478476                    from ug in context.UserGroupBases.OfType<DA.UserGroup>()
     
    656654      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    657655
    658       //TODO: usernames and rolenames have to be unique!
    659656      MembershipUser msUser = Membership.GetUser((object)user.Id);
    660657      if (msUser != null) {
     
    702699
    703700    public IEnumerable<DT.UserGroup> GetUserGroupsOfUser(Guid userId) {
    704 
    705701      using (DA.AccessServiceDataContext context = new DA.AccessServiceDataContext()) {
    706702        var groupIds = from g in context.UserGroupUserGroups
     
    812808    #region UserGroupBase
    813809    public IEnumerable<DT.UserGroupBase> GetAllLeightweightUsersAndGroups() {
    814       //TODO: it must be possible to include a role so not all users are returned but only the ones who are allowed to use a certain service
    815810      List<DT.UserGroup> userGroups = new List<DT.UserGroup>();
    816811      List<DT.UserGroupBase> result = new List<DT.UserGroupBase>();
    817812
    818       // this is just for generating users from asp.net authenticaton db; we should maybe provide an updatescript instead
    819813      List<Guid> accessUserGuids = null;
    820814      using (DA.ASPNETAuthenticationDataContext context = new DA.ASPNETAuthenticationDataContext()) {
  • branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/DataTransfer/Role.cs

    r7355 r8039  
    2323
    2424namespace HeuristicLab.Services.Access.DataTransfer {
    25 
    2625  [DataContract]
    2726  public class Role : AccessItem {
Note: See TracChangeset for help on using the changeset viewer.