From 40e50b94ee87f705211fce381a513c5880755608 Mon Sep 17 00:00:00 2001 From: IMaster Date: Mon, 21 Oct 2024 14:52:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Admin.NET/Admin.NET.Core/S?= =?UTF-8?q?ervice/Role/SysRoleService.cs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加没有对应接口的按钮增加到授权集合 --- Admin.NET/Admin.NET.Core/Service/Role/SysRoleService.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Admin.NET/Admin.NET.Core/Service/Role/SysRoleService.cs b/Admin.NET/Admin.NET.Core/Service/Role/SysRoleService.cs index 390c09ab..c7256146 100644 --- a/Admin.NET/Admin.NET.Core/Service/Role/SysRoleService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Role/SysRoleService.cs @@ -311,6 +311,14 @@ public class SysRoleService : IDynamicApiController, ITransient foreach (var controller in apiOutput.Children) apiList[0].AddRange(controller.Children.Select(u => u.Route)); } + + // 按钮权限集合 + var allButtonList = await GetButtonList(new()); + + // 没有对应接口的按钮集合 + var diffList = allButtonList.Except(apiList[0]).ToList(); + + apiList[0].AddRange(diffList); } else {