fix: allow super admin tenant-scoped role ops

This commit is contained in:
2025-12-05 23:07:31 +08:00
parent 1060ab13d6
commit d7772b0f8d
13 changed files with 64 additions and 28 deletions

View File

@@ -18,7 +18,7 @@ public sealed class CreateRoleCommandHandler(
public async Task<RoleDto> Handle(CreateRoleCommand request, CancellationToken cancellationToken)
{
// 1. 获取租户上下文
var tenantId = tenantProvider.GetCurrentTenantId();
var tenantId = request.TenantId ?? tenantProvider.GetCurrentTenantId();
// 2. 构建角色实体
var role = new Role