Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -917,9 +917,19 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
await _fusionCache.RemoveAsync(CacheKeys.UserToken(identityUserId));
|
||||
|
||||
var userName = await _userRoleRepository.Where(t => t.Id == userRoleId).Select(t => t.IdentityUser.UserName).FirstOrDefaultAsync();
|
||||
if (_identityUserRepository.Any(t => t.Id == identityUserId))
|
||||
{
|
||||
|
||||
var userName = await _userRoleRepository.Where(t => t.Id == userRoleId).Select(t => t.IdentityUser.UserName).FirstOrDefaultAsync();
|
||||
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = identityUserId, ActionUserName = userName, OptType = UserOptType.LoginOut }, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = null, ActionUserName = _userInfo.UserName, OptType = UserOptType.LoginOut }, true);
|
||||
}
|
||||
|
||||
|
||||
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = identityUserId, ActionUserName = userName, OptType = UserOptType.LoginOut }, true);
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
result.ReviewStatus = info.ReviewStatus;
|
||||
}
|
||||
|
||||
result.Token = _tokenService.GetToken(new UserTokenInfo() { IdentityUserId = Guid.NewGuid() });
|
||||
result.Token = _tokenService.GetToken(new UserTokenInfo() { IdentityUserId = Guid.NewGuid(), UserName = $"Reviewer_{inDto.EmailOrPhone}" });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -678,8 +678,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
Token = _tokenService.GetToken(new UserTokenInfo()
|
||||
{
|
||||
IdentityUserId = Guid.NewGuid(),
|
||||
|
||||
UserRoleId = Guid.NewGuid(),
|
||||
UserName = "SiteSurvey",
|
||||
UserName = $"SiteSurvey_{currentEntity.Email}",
|
||||
UserTypeEnum = UserTypeEnum.Undefined,
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user