From 41a5531dc31a642623f0a7a766fbe9c256ba9247 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期二, 11 二月 2025 13:53:29 +0800
Subject: [PATCH] 优化WMS前端
---
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_RoleService.cs | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_RoleService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_RoleService.cs"
index a3f689d..7526baa 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_RoleService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_RoleService.cs"
@@ -167,7 +167,9 @@
string message = "";
try
{
- if (!GetAllChildren(App.User.RoleId).Exists(x => x.Id == roleId))
+ var RoleNodes = GetAllChildren(App.User.RoleId);
+ RoleNodes = RoleNodes.Where(x => x.Id != App.User.RoleId).ToList();
+ if (!RoleNodes.Exists(x => x.Id == roleId) /*&& !App.User.IsRoleIdSuperAdmin(App.User.RoleId)*/)
return WebResponseContent.Instance.Error("娌℃湁鏉冮檺淇敼姝よ鑹茬殑鏉冮檺淇℃伅");
//褰撳墠鐢ㄦ埛鐨勬潈闄�
List<Permissions> permissions = _MenuRepository.GetPermissions(App.User.RoleId);
@@ -212,9 +214,9 @@
}
//鏇存柊鏉冮檺
- _RoleAuthRepository.UpdateData(updateAuths);
+ _RoleAuthRepository.UpdateData(updateAuths.Where(x => x.AuthId > 0).ToList());
//鏂板鐨勬潈闄�
- _RoleAuthRepository.AddData(updateAuths);
+ _RoleAuthRepository.AddData(updateAuths.Where(x => x.AuthId <= 0).ToList());
//鑾峰彇鏉冮檺鍙栨秷鐨勬潈闄�
int[] authIds = roleAuths.Where(x => userPermissions.Select(u => u.Id)
--
Gitblit v1.9.3