Changeset 7936


Ignore:
Timestamp:
05/30/12 16:58:04 (9 years ago)
Author:
ascheibe
Message:

#1648 fixed a bug when retrieving the groups for a user

Location:
branches/ClientUserManagement
Files:
2 edited

Legend:

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

    r7611 r7936  
    2121
    2222using System;
    23 using System.Collections.Generic;
    2423using System.ServiceModel.Security;
    2524
     
    4948    }
    5049
    51     //the groups a user is in
    52     private List<UserGroup> groups;
    53     public List<UserGroup> Groups {
    54       get { return groups; }
    55     }
    56 
    57     //the roles a user has
    58     private List<Role> roles;
    59     public List<Role> Roles {
    60       get { return roles; }
    61     }
    62 
    6350    private bool errorOccured;
    6451    public bool ErrorOccured {
     
    8370      try {
    8471        AccessClient.CallAccessService(x => user = x.Login());
    85         //TODO: get rid of the next 2 calls
    86         AccessClient.CallAccessService(x => groups = x.GetGroupsOfCurrentUser());
    87         AccessClient.CallAccessService(x => roles = x.GetRolesOfCurrentUser());
    8872        errorOccured = false;
    8973        userExists = true;
  • branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/AccessService.cs

    r7651 r7936  
    378378            accessUser = query.First();
    379379            groups = (from ug in context.UserGroupUserGroups
    380                       where ug.UserGroupUserGroupId == accessUser.Id
    381                       join g in context.UserGroupBases.OfType<DA.UserGroup>() on ug.UserGroupId equals g.Id
     380                      where ug.UserGroupId == accessUser.Id
     381                      join g in context.UserGroupBases.OfType<DA.UserGroup>() on ug.UserGroupUserGroupId equals g.Id
    382382                      select g).ToList();
    383383          } else {
Note: See TracChangeset for help on using the changeset viewer.