Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/07/17 14:41:47 (6 years ago)
Author:
jzenisek
Message:

#2839 worked on resource permission checks (v2 = accelerated verison)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveProjectManagement/HeuristicLab.Services.Access/3.3/UserManager.cs

    r14185 r15500  
    5454    }
    5555
     56    public IEnumerable<Guid> GetUserGroupIdsOfUser(Guid userId) {
     57      using (DA.AccessServiceDataContext context = new DA.AccessServiceDataContext()) {
     58        var groupIds = from g in context.UserGroupUserGroups
     59                       where g.UserGroupId == userId
     60                       select g.UserGroupUserGroupId;
     61
     62        var query = from g in context.UserGroupBases.OfType<DA.UserGroup>()
     63                    where groupIds.Contains(g.Id)
     64                    select g.Id;
     65
     66        return query.ToList();
     67      }
     68    }
     69
    5670    public bool VerifyUser(Guid userId, List<Guid> allowedUserGroups) {
    5771      List<DA.UserGroupUserGroup> userGroupBases;
Note: See TracChangeset for help on using the changeset viewer.