From 9158a3849677beb84bf05ee14b26cd90e1c05786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B7=B3?= <454313500@qq.com> Date: Thu, 9 Nov 2023 08:49:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=97=A0=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Rbac/Services/Impl/AccountService.cs | 7 ++++++- .../Rbac/Dtos/Account/RestPasswordDto.cs | 2 +- .../Yi.Furion.Web.Entry/yi-furion-dev.db | Bin 266240 -> 266240 bytes 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/AccountService.cs b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/AccountService.cs index 6cb78b3a..9951bfaf 100644 --- a/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/AccountService.cs +++ b/Yi.Furion.Net6/Yi.Furion.Application/Rbac/Services/Impl/AccountService.cs @@ -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 /// /// [HttpPut] - public async Task RestPasswordAsync(long userId, RestPasswordDto input) + public async Task RestPasswordAsync(long userId,[FromBody] RestPasswordDto input) { if (string.IsNullOrEmpty(input.Password)) { diff --git a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/RestPasswordDto.cs b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/RestPasswordDto.cs index e4a6d5be..120bc089 100644 --- a/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/RestPasswordDto.cs +++ b/Yi.Furion.Net6/Yi.Furion.Core/Rbac/Dtos/Account/RestPasswordDto.cs @@ -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; } } diff --git a/Yi.Furion.Net6/Yi.Furion.Web.Entry/yi-furion-dev.db b/Yi.Furion.Net6/Yi.Furion.Web.Entry/yi-furion-dev.db index 5ea98c088fa528bb9a6c871fb2f9f6b3a5e0db60..4269448843b9e19535c4e7dfe01c8130ed58627c 100644 GIT binary patch delta 4703 zcmaLbeQXf*fhs5xLI^<_tJ(r(XbNaTz&8Gv&=m0^ZL}W!XA-I=K%2&$Uy@&+ zBK(i@&F7vw-`T#q$6J?`t;@>A4pw~@@~ryPhrUO6mh3TP@2Xq*BT@TUQE2QJSb-Oe zN1;%-eeLOYe)8O{AMf10a_zY1_Qq#AatiBY7=|V9Gvs|^)VsuPq}3`ow$l{>PkHig+4$Kwu4gFnPsCGPTqLpXsd&JeE@=C4MsBX)06BkLR(Du#US}m<7!&xs#q0434)YBQ z)nqW5NU8B;(poNG`EL2*S8hG~eD%QBYv=X9vUfP+jh?;n(%;xwMPKE&8S)nS4f#HK zikv2kBuEtbpYj{>b@_Su^YX{#3E3xGq`ynANI#IiCVfg;mQ<-hyes}m{F(SI@r&Xo z#3`{y@)B?*$mndansiJyy!;2I%u!sgP zP}&CzNarc-g?XfNl=i?J(xOgrHxv=iQtE?Qq%)LyVFu|mrCl(Mv`|yMeyBU4fH+SL z2FN4LQQ84Hq*+SaA&YeCUe%R0m_j^xFDtDuiFATe4@@AY({i8QV zaTAQ8!D&hxA&oReX#=E?CMk78@<4SZL9qgf16Jac5{M&>Q7S_WY2~aEFwTMIQpUGQ zf+*5RWvqU{B18~t)T&*eAq`XN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