Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8265


Ignore:
Timestamp:
07/09/12 16:49:18 (12 years ago)
Author:
spimming
Message:

#1888:

  • calling roles caused an exception
  • fix: call default provider instance directly
Location:
branches/OaaS/HeuristicLab.Services.Access/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/OaaS/HeuristicLab.Services.Access/3.3/HeuristicLab.Services.Access-3.3.csproj

    r8040 r8265  
    8787    <Reference Include="Microsoft.CSharp" />
    8888    <Reference Include="System" />
     89    <Reference Include="System.Configuration" />
    8990    <Reference Include="System.Core" />
    9091    <Reference Include="System.Data" />
  • branches/OaaS/HeuristicLab.Services.Access/3.3/RoleVerifier.cs

    r8040 r8265  
    2727  public class RoleVerifier : IRoleVerifier {
    2828    public bool IsInRole(string role) {
    29       return Roles.IsUserInRole(role);
     29      return Roles.Provider.IsUserInRole(Membership.GetUser().UserName, role);
    3030    }
    3131    public bool IsInAnyRole(params string[] roles) {
    32       return roles.Any(x => Roles.IsUserInRole(x));
     32      return roles.Any(x => Roles.Provider.IsUserInRole(Membership.GetUser().UserName, x));
    3333    }
    3434    public bool IsInAllRoles(params string[] roles) {
Note: See TracChangeset for help on using the changeset viewer.