mahao 1 year ago
parent
commit
bc330f1012
  1. 2
      code/src/Modules/BaseService/BaseService.Application/UserManagement/RoleAppService.cs
  2. 2
      code/src/Modules/BaseService/BaseService.Application/UserManagement/UserAppService.cs
  3. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js
  4. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/index.js

2
code/src/Modules/BaseService/BaseService.Application/UserManagement/RoleAppService.cs

@ -11,7 +11,7 @@ using Volo.Abp.Identity;
namespace BaseService.UserManagement namespace BaseService.UserManagement
{ {
[Route("api/[controller]/[action]")] [Route("api/[controller]/[action]")]
[Authorize(IdentityPermissions.Roles.Default)] //[Authorize(IdentityPermissions.Roles.Default)]
public class RoleAppService : ApplicationService public class RoleAppService : ApplicationService
{ {
private IdentityRoleManager _roleManager { get; } private IdentityRoleManager _roleManager { get; }

2
code/src/Modules/BaseService/BaseService.Application/UserManagement/UserAppService.cs

@ -25,7 +25,7 @@ using IdentityUser = Volo.Abp.Identity.IdentityUser;
namespace BaseService.Systems.UserManagement namespace BaseService.Systems.UserManagement
{ {
[Route("api/base/user")] [Route("api/base/user")]
[Authorize(IdentityPermissions.Users.Default)] //[Authorize(IdentityPermissions.Users.Default)]
public class UserAppService : ApplicationService, IUserAppService public class UserAppService : ApplicationService, IUserAppService
{ {
protected IdentityUserManager UserManager { get; } protected IdentityUserManager UserManager { get; }

8
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js

@ -58,10 +58,10 @@ export default [
...createPage("bei-jian", "title=备件价格单"), ...createPage("bei-jian", "title=备件价格单"),
children: [createButton("query", "title=查询&isTop=true"), createButton("import", "title=导入&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")], children: [createButton("query", "title=查询&isTop=true"), createButton("import", "title=导入&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
}, },
{ // {
...createPage("cai-gou", "title=采购价格单"), // ...createPage("cai-gou", "title=采购价格单"),
children: [createButton("query", "title=查询&isTop=true"), createButton("import", "title=导入&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")], // children: [createButton("query", "title=查询&isTop=true"), createButton("import", "title=导入&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
}, // },
{ {
...createPage("xiao-shou", "title=销售价格单"), ...createPage("xiao-shou", "title=销售价格单"),
children: [createButton("query", "title=查询&isTop=true"), createButton("import", "title=导入&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")], children: [createButton("query", "title=查询&isTop=true"), createButton("import", "title=导入&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/index.js

@ -86,6 +86,10 @@ const refreshRouter = async () => {
const appStore = useAppStore(); const appStore = useAppStore();
const permissions = appStore.user.permissions; const permissions = appStore.user.permissions;
const serverRoutes = Object.assign([], remoteRoutes); const serverRoutes = Object.assign([], remoteRoutes);
if (appStore.user.roles.some((o) => o === "物流")) {
const baseDataRoutes = serverRoutes.find((o) => o.path === "base-data");
baseDataRoutes.children = baseDataRoutes.children.filter((o) => o.path !== "bei-jian" && o.path !== "xiao-shou");
}
const setPermission = (list, parent = null) => { const setPermission = (list, parent = null) => {
list.forEach((o) => { list.forEach((o) => {
// full path // full path

Loading…
Cancel
Save