fix: 修复登录无权限问题
This commit is contained in:
@@ -127,6 +127,11 @@ namespace Yi.Furion.Application.Rbac.Services.Impl
|
||||
{
|
||||
throw new UserFriendlyException(UserConst.No_Role);
|
||||
}
|
||||
if (userInfo.PermissionCodes.Count == 0)
|
||||
{
|
||||
throw new UserFriendlyException(UserConst.No_Permission);
|
||||
}
|
||||
|
||||
//这里抛出一个登录的事件
|
||||
var loginLogEntity = _httpContextAccessor.HttpContext.GetLoginLogInfo();
|
||||
await _eventPublisher.PublishAsync(new LoginEventSource(new LoginEventArgs
|
||||
@@ -345,7 +350,7 @@ namespace Yi.Furion.Application.Rbac.Services.Impl
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
public async Task<bool> RestPasswordAsync(long userId, RestPasswordDto input)
|
||||
public async Task<bool> RestPasswordAsync(long userId,[FromBody] RestPasswordDto input)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input.Password))
|
||||
{
|
||||
|
||||
@@ -8,6 +8,6 @@ namespace Yi.Furion.Core.Rbac.Dtos.Account
|
||||
{
|
||||
public class RestPasswordDto
|
||||
{
|
||||
public string Password = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user