fix 扫描问题

This commit is contained in:
2025-02-14 17:08:53 +08:00
parent 167995a48e
commit 660b3314d5
5 changed files with 6 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ namespace Dlhis.Basic.Common.ApiLog.Controller;
/// <summary>
/// API日志控制器
/// </summary>
[Authorize]
[Authorize(Roles = "admin")]
[Route("api/[controller]")]
[ApiController]
public class ApiLogController : ControllerBase

View File

@@ -67,7 +67,9 @@ public class GainfoFaceService : IGainfoFaceService
public async Task<GainfoFacePageSummaryResponse> GetPageAsync(GainfoFacePageRequest request)
{
var tenantIds = _currentUser.GetUserClaim("tenants").Split(",").ToList();
var factories = request.Factories;
factories = factories.Where(x => tenantIds.Contains(x)).ToList();
var userCodes = await _dbContext.Queryable<GainfoEntity>().Where(x => factories.Contains(x.Factory)).Select(x => x.Code).ToListAsync();
var existsFaceCodes = await _faceDbContext.Queryable<GainfoFaceEntity>().Where(x => userCodes.Contains(x.UserCode)).Select(x => x.UserCode).ToListAsync();

View File

@@ -34,6 +34,7 @@ public class IdentityUserSyncService : IIdentityUserSyncService
NormalizedUserName = userName.ToUpper(),
ConcurrencyStamp = Guid.NewGuid().ToString(),
SecurityStamp = Guid.NewGuid().ToString(),
LockoutEnabled = true
};
password = hasher.HashPassword(user, password);
user.PasswordHash = password;

View File

@@ -11,6 +11,7 @@ namespace Dlhis.Sys.Identity.Controllers;
/// <summary>
/// 用户
/// </summary>
[Authorize]
[Route("api/[controller]")]
[ApiController]
public class UsersController : ControllerBase

View File

@@ -116,6 +116,7 @@ public class UserService : IUserService
NormalizedUserName = request.Username.ToUpper(),
ConcurrencyStamp = Guid.NewGuid().ToString(),
SecurityStamp = Guid.NewGuid().ToString(),
LockoutEnabled = true
};
request.Password = hasher.HashPassword(user, request.Password);
user.PasswordHash = request.Password;