示例#1
0
 public async Task <IEnumerable <ConfigEntrySlim> > GetGroupConfigurationAsync(ClaimsPrincipal user, string groupName) =>
 await _configRepository.GetWeightedConfigEntryByGroupAsync(
     Environment,
     user.Application(),
     user.DomainName(),
     user.UserName(),
     groupName);
示例#2
0
 public async Task <ConfigEntrySlim> GetSettingAsync(ClaimsPrincipal user, string key) =>
 await _configRepository.GetWeightedConfigEntryByKeyAsync(
     Environment,
     user.Application(),
     user.DomainName(),
     user.UserName(),
     key);
示例#3
0
 public async Task <ConfigEntrySlim> GetSettingAsync(ClaimsPrincipal user, string key) =>
 await repository.GetWeightedConfigEntryByKeyAsync(
     environment,
     user.Application(),
     user.DomainName(),
     user.UserName(),
     key.ToLowerInvariant());
示例#4
0
 public static SessionInfo AsSessionInfo(this ClaimsPrincipal principal) =>
 new SessionInfo
 {
     ApplicationName    = principal.Application(),
     ApplicationVersion = principal.ApplicationVersion(),
     SessionId          = principal.SessionId(),
     DepartmentName     = principal.Department(),
     DomainName         = principal.DomainName(),
     UserName           = principal.UserName(),
     RoleNames          = principal.GetRoles(),
     MachineName        = principal.MachineName()
 };
示例#5
0
 private string BuildCacheKey(ClaimsPrincipal c, string suffix) => BuildCacheKey(Prefix, Environment, c.Application(), c.DomainName(), c.UserName(), suffix);
示例#6
0
 public async Task <IEnumerable <ConfigEntrySlim> > GetUserConfigurationAsync(ClaimsPrincipal user) =>
 await _configRepository.GetWeightedConfigEntriesAsync(
     Environment,
     user.Application(),
     user.DomainName(),
     user.UserName());