Browse Source

Merge branch 'feature/task_245_rest' into dev

qinchaoyue 2 months ago
parent
commit
b109502ed0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/XF.Domain/Authentications/DefaultSessionContext.cs

+ 2 - 1
src/XF.Domain/Authentications/DefaultSessionContext.cs

@@ -44,7 +44,8 @@ namespace XF.Domain.Authentications
         /// <summary>
         /// Roles
         /// </summary>
-        public string[] Roles { get => _context.User.Claims.Where(d => d.Type == JwtClaimTypes.Role).Select(d => d.Value).ToArray(); init { } }
+        // public string[] Roles { get => _context.User.Claims.Where(d => d.Type == JwtClaimTypes.Role).Select(d => d.Value).ToArray(); init { } }
+        public string[] Roles { get => _context.User.Claims.Where(d => d.Type == ClaimTypes.Role).Select(d => d.Value).ToArray(); init { } }
 
         public string? OrgId { get => _context.User.FindFirstValue(AppClaimTypes.DepartmentId); init { } }
         public string? OrgName { get => _context.User.FindFirstValue(AppClaimTypes.DepartmentName); init { } }