租户名称

booking_auth_dev
wet 2 years ago
parent b094f6ce12
commit 9d69412ebb

@ -32,7 +32,7 @@ namespace Myshipping.Core
identity.AddClaim(new Claim(type: ClaimConst.CLAINM_NAME, value: "管理员"));
identity.AddClaim(new Claim(type: ClaimConst.CLAINM_SUPERADMIN, value: AdminType.Admin.ToString()));
identity.AddClaim(new Claim(type: ClaimConst.CLAINM_TENANT_TYPE, value: TenantTypeEnum.SYSTEM.ToString()));
identity.AddClaim(new Claim(type: ClaimConst.CLAINM_TENANT_NAME, value: "测试"));
identity.AddClaim(new Claim(type: ClaimConst.TENANT_NAME, value: "测试"));
ClaimsPrincipal claimsPrincipal = new ClaimsPrincipal(identity);
httpContext.User = claimsPrincipal;
}

@ -532,7 +532,7 @@
租户类型
</summary>
</member>
<member name="F:Myshipping.Core.ClaimConst.CLAINM_TENANT_NAME">
<member name="F:Myshipping.Core.ClaimConst.TENANT_NAME">
<summary>
租户名称
</summary>

@ -93,7 +93,7 @@ public class AuthService : IAuthService, IDynamicApiController, ITransient
{ClaimConst.CLAINM_NAME, user.Name},
{ClaimConst.CLAINM_SUPERADMIN, user.AdminType},
{ ClaimConst.CLAINM_TENANT_TYPE, tenant.TenantType },
{ ClaimConst.CLAINM_TENANT_NAME, tenant.Name },
{ ClaimConst.TENANT_NAME, tenant.Name },
{ ClaimConst.DjyUserId, user.DjyUserId },
});
@ -148,7 +148,7 @@ public class AuthService : IAuthService, IDynamicApiController, ITransient
{ ClaimConst.CLAINM_NAME, user.Name },
{ ClaimConst.CLAINM_SUPERADMIN, user.AdminType },
{ ClaimConst.CLAINM_TENANT_TYPE, tenant.TenantType },
{ ClaimConst.CLAINM_TENANT_NAME, tenant.Name },
{ ClaimConst.TENANT_NAME, tenant.Name },
{ ClaimConst.DjyUserId, user.DjyUserId },
});

@ -336,7 +336,7 @@ public static class SqlSugarSetup
{
var tenantName = ((dynamic)entityInfo.EntityValue).TenantName;
if (string.IsNullOrEmpty(tenantName))
entityInfo.SetValue(App.User.FindFirst(ClaimConst.CLAINM_TENANT_NAME)?.Value);
entityInfo.SetValue(App.User.FindFirst(ClaimConst.TENANT_NAME)?.Value);
}
if (entityInfo.PropertyName == "CreatedUserId")
{

Loading…
Cancel
Save