Sfoglia il codice sorgente

新建租户时默认菜单集合

zuohuaijun 3 anni fa
parent
commit
e62269a28c

+ 12 - 0
Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs

@@ -173,6 +173,18 @@ public class SysTenantService : IDynamicApiController, ITransient
             UserId = newUser.Id
         };
         await _userRoleRep.InsertAsync(newUserRole);
+
+        // 默认租户管理员角色菜单集合
+        var menuIdList = new List<long> { 252885263002100,252885263002110,252885263002111,
+            252885263005200,252885263005210,252885263005211,252885263005212,252885263005213,252885263005214,252885263005215,252885263005216,252885263005217,252885263005218,252885263005219,252885263015220,
+            252885263005220,252885263005221,252885263005222,252885263005223,252885263005224,252885263005225,252885263005226,252885263005227,
+            252885263005230,252885263005231,252885263005232,252885263005233,252885263005234,
+            252885263005240,252885263005241,252885263005242,252885263005243,252885263005244,
+            252885263005250,252885263005251,252885263005252,252885263005253,252885263005254,
+            252885263005260,252885263005261,252885263005262,252885263005263,
+            252885263005270,252885263005271,252885263005272,252885263005273,252885263005274,252885263005275,252885263005276
+        };
+        await _sysRoleMenuService.GrantRoleMenu(new RoleMenuInput() { Id = newRole.Id, MenuIdList = menuIdList });
     }
 
     /// <summary>