李昊 4 éve
szülő
commit
7cb6636d04

+ 4 - 2
GxPress/Api/GxPress.Api/AppControllers/UserController.cs

@@ -82,7 +82,8 @@ namespace GxPress.Api.AppControllers
             var claims = new[]
             {
                 new Claim(ClaimTypes.NameIdentifier, result.UserId.ToString()),
-                new Claim(ClaimTypes.Role, AccountTypeConst.User.ToString())
+                new Claim(ClaimTypes.Role, AccountTypeConst.User.ToString()),
+                new Claim(ClaimTypes.GroupSid,result.DepartmentId.ToString())
             };
             result.Token = TokenHelper.BuildToken(_jwtOptions, claims);
             return result;
@@ -103,7 +104,8 @@ namespace GxPress.Api.AppControllers
                 var claims = new[]
                 {
                 new Claim(ClaimTypes.NameIdentifier, result.UserId.ToString()),
-                new Claim(ClaimTypes.Role, AccountTypeConst.User.ToString())
+                new Claim(ClaimTypes.Role, AccountTypeConst.User.ToString()),
+                new Claim(ClaimTypes.GroupSid,result.DepartmentId.ToString())
             };
                 result.Token = TokenHelper.BuildToken(_jwtOptions, claims);
                 return result;