From 35aa02298425570d9d15496e3fb9277406cfbbfc Mon Sep 17 00:00:00 2001 From: ccnetcore Date: Sat, 21 Jun 2025 13:29:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=EF=BC=8C=E8=B6=85=E7=AE=A1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/System/UserService.cs | 10 +++++++--- Yi.Bbs.Vue3/src/layout/AppHeader.vue | 5 +++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/System/UserService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/System/UserService.cs index 70597f3b..3a386b97 100644 --- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/System/UserService.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/System/UserService.cs @@ -145,11 +145,15 @@ namespace Yi.Framework.Rbac.Application.Services.System /// [OperLog("更新用户", OperEnum.Update)] [Permission("system:user:edit")] - public async override Task UpdateAsync(Guid id, UserUpdateInputVo input) + public override async Task UpdateAsync(Guid id, UserUpdateInputVo input) { - if (input.UserName == UserConst.Admin || input.UserName == UserConst.TenantAdmin) + //不是超管,不能更新成超管 + if (!UserConst.Admin.Equals(CurrentUser.UserName)) { - throw new UserFriendlyException(UserConst.Name_Not_Allowed); + if (input.UserName == UserConst.Admin || input.UserName == UserConst.TenantAdmin) + { + throw new UserFriendlyException(UserConst.Name_Not_Allowed); + } } if (await _repository.IsAnyAsync(u => input.UserName!.Equals(u.UserName) && !id.Equals(u.Id))) diff --git a/Yi.Bbs.Vue3/src/layout/AppHeader.vue b/Yi.Bbs.Vue3/src/layout/AppHeader.vue index d4faba48..a5787f0e 100644 --- a/Yi.Bbs.Vue3/src/layout/AppHeader.vue +++ b/Yi.Bbs.Vue3/src/layout/AppHeader.vue @@ -14,7 +14,7 @@ 开始 有偿悬赏 + >意心Ai 商城 @@ -234,7 +234,8 @@ const enterStart = () => { } const enterTemp=()=>{ - router.push("/discuss/24cc0526-86e7-aabf-e091-3a0f83c3e604/false"); + alert("即将上线!意社区-高质量ai平台,一心一意只为打造更良心的ai平台") + //router.push("/discuss/24cc0526-86e7-aabf-e091-3a0f83c3e604/false"); } const enterShop=()=>{ router.push("/shop");