Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7614


Ignore:
Timestamp:
03/14/12 14:47:52 (12 years ago)
Author:
ascheibe
Message:

#1648 started working on a user administration interface

Location:
branches/ClientUserManagement
Files:
22 added
6 edited

Legend:

Unmodified
Added
Removed
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews/UserInformationDialog.Designer.cs

    r7611 r7614  
    6767      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
    6868      this.Text = "User Information";
     69      this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.UserInformationDialog_FormClosing);
    6970      this.ResumeLayout(false);
    7071
  • branches/ClientUserManagement/HeuristicLab.Clients.Access.Views/3.3/UserViews/UserInformationDialog.cs

    r7599 r7614  
    3232      if (!DesignMode) {
    3333        refreshableLightweightUserInformationView.Content = AccessClient.Instance;
     34        AccessClient.Instance.Refreshing += new System.EventHandler(Instance_Refreshing);
     35        AccessClient.Instance.Refreshed += new System.EventHandler(Instance_Refreshed);
    3436      }
     37    }
     38
     39    void Instance_Refreshed(object sender, System.EventArgs e) {
     40      closeButton.Enabled = true;
     41    }
     42
     43    void Instance_Refreshing(object sender, System.EventArgs e) {
     44      closeButton.Enabled = false;
    3545    }
    3646
     
    3848      Close();
    3949    }
     50
     51    private void UserInformationDialog_FormClosing(object sender, FormClosingEventArgs e) {
     52      AccessClient.Instance.Refreshing -= new System.EventHandler(Instance_Refreshing);
     53      AccessClient.Instance.Refreshed -= new System.EventHandler(Instance_Refreshed);
     54    }
    4055  }
    4156}
  • branches/ClientUserManagement/HeuristicLab.Clients.Access/3.3/HeuristicLab.Clients.Access-3.3.csproj

    r7599 r7614  
    101101    <Compile Include="ServiceClients\ClientGroup.cs" />
    102102    <Compile Include="ServiceClients\Client.cs" />
     103    <Compile Include="ServiceClients\User.cs" />
    103104    <Compile Include="ServiceClients\Role.cs" />
    104105    <Compile Include="ServiceClients\Resource.cs" />
  • branches/ClientUserManagement/HeuristicLab.Services.Access.sln

    r7555 r7614  
    2121EndProject
    2222Project("{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}"
     23EndProject
     24Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Clients.Access.Administration-3.3", "HeuristicLab.Clients.Access.Administration\3.3\HeuristicLab.Clients.Access.Administration-3.3.csproj", "{C9CF6AE8-4637-4A75-9141-042F479B5D50}"
    2325EndProject
    2426Global
     
    9597    {FE856595-64CD-46DA-9CD2-FFF3E6B0D4F2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
    9698    {FE856595-64CD-46DA-9CD2-FFF3E6B0D4F2}.Release|x86.ActiveCfg = Release|Any CPU
     99    {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     100    {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Debug|Any CPU.Build.0 = Debug|Any CPU
     101    {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
     102    {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
     103    {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Debug|x86.ActiveCfg = Debug|Any CPU
     104    {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Release|Any CPU.ActiveCfg = Release|Any CPU
     105    {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Release|Any CPU.Build.0 = Release|Any CPU
     106    {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
     107    {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Release|Mixed Platforms.Build.0 = Release|Any CPU
     108    {C9CF6AE8-4637-4A75-9141-042F479B5D50}.Release|x86.ActiveCfg = Release|Any CPU
    97109  EndGlobalSection
    98110  GlobalSection(SolutionProperties) = preSolution
  • branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/AccessService.cs

    r7612 r7614  
    143143
    144144    public void DeleteClient(DT.Client client) {
    145       roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     145      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    146146
    147147      using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) {
     
    200200
    201201    public void DeleteClientGroup(DT.ClientGroup clientGroup) {
    202       roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     202      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    203203
    204204      using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) {
     
    293293
    294294    public void DeleteClientLog(DT.ClientLog log) {
    295       roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     295      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    296296
    297297      using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) {
     
    324324      }
    325325
    326       if (aspUser == null || aspMembership == null) {
     326      if (aspUser != null || aspMembership != null) {
    327327        using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) {
    328328          var query = from u in context.UserGroupBases.OfType<DA.User>()
     
    444444
    445445    public IEnumerable<DT.User> GetAllUsers() {
     446      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     447
    446448      List<Guid> accessUserGuids = null;
    447449
     
    456458
    457459    public IEnumerable<DT.User> GetUsers(IEnumerable<Guid> ids) {
     460      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     461
    458462      List<Guid> accessUserGuids = null;
    459463
     
    490494
    491495    public DT.User AddUser(DT.User user) {
    492       roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     496      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    493497
    494498      DA.User accessUser;
     
    537541
    538542    public void DeleteUser(DT.User user) {
    539       roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     543      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    540544
    541545      if (user.Id != null && user.Id != Guid.Empty) {
     
    561565
    562566    public void UpdateUser(DT.User user) {
    563       roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     567      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    564568
    565569      AddUser(user);
     
    567571
    568572    public void AddUserToRole(DT.Role role, DT.User user) {
    569       roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     573      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    570574
    571575      //TODO: usernames and rolenames have to be unique!
     
    577581
    578582    public void RemoveUserFromRole(DT.Role role, DT.User user) {
    579       roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     583      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    580584
    581585      MembershipUser msUser = Membership.GetUser((object)user.Id);
     
    594598
    595599    public string ResetPassword(Guid userId) {
    596       roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     600      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    597601
    598602      MembershipUser msUser = Membership.GetUser(userId);
     
    653657
    654658    public void DeleteUserGroup(DT.UserGroup group) {
    655       roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     659      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    656660
    657661      using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) {
     
    762766
    763767    public DT.Role AddRole(DT.Role role) {
    764       roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     768      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    765769
    766770      Roles.CreateRole(role.Name);
     
    769773
    770774    public void DeleteRole(DT.Role role) {
    771       roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     775      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    772776
    773777      Roles.DeleteRole(role.Name);
     
    800804
    801805    public void RemoveRoleFromGroup(DT.UserGroup userGroup, DT.Role role) {
    802       roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     806      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    803807
    804808      Guid[] userIds;
     
    830834
    831835    public IEnumerable<DT.ClientError> GetClientErrors() {
    832       roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     836      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    833837
    834838      using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) {
     
    840844
    841845    public IEnumerable<DT.ClientError> GetLastClientErrors(DateTime startDate) {
    842       roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     846      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    843847
    844848      using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) {
     
    851855
    852856    public void DeleteError(DT.ClientError error) {
    853       roleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
     857      RoleVerifier.AuthenticateForAllRoles(AccessServiceRoles.Administrator);
    854858
    855859      using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) {
  • branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/Convert.cs

    r7599 r7614  
    292292        FullName = source.FullName,
    293293        UserName = aspUserSource.UserName,
     294        //TODO: check if the roles and groups are include in source
    294295        Roles = roles.Select(x => Convert.ToDto(x)).ToArray(),
    295296        Groups = groups.Select(x => Convert.ToDto(x)).ToArray()
Note: See TracChangeset for help on using the changeset viewer.