fix 扫描问题
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Dlhis.Sys.Identity.Controllers;
|
||||
/// <summary>
|
||||
/// 用户
|
||||
/// </summary>
|
||||
[Authorize]
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class UsersController : ControllerBase
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user