Pārlūkot izejas kodu

角色权限admin添加

4.0
ht pirms 2 gadiem
vecāks
revīzija
b148e4d35b
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. +2
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/preview/PreviewMenuTreeService.java

+ 2
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/preview/PreviewMenuTreeService.java Parādīt failu

@@ -38,7 +38,7 @@ public class PreviewMenuTreeService {
List<MenuVO> menuVOList = buildMenu(prj_id, module, us,home);
if (!CommUtil.isEmpty(menuVOList)) {
R r = R.success(menuVOList);
if(home.getId()>0){
if(home.getId()!=null&&home.getId()>0){
r.put("home",home);
}
return r;
@@ -85,7 +85,7 @@ public class PreviewMenuTreeService {
}

public List<MenuVO> buildMenu(String prj_id, String module, UserSession us,MenuVO home) {
Set<MenuPlan> set = RoleHelper.getMenuPlans(us.getUserId(),us.getPartyId());
Set<MenuPlan> set = RoleHelper.isAdmin(us.getUserId()) ? MenuPlanCache.getInstance().getByP(prj_id):RoleHelper.getMenuPlans(us.getUserId(),us.getPartyId());
if (CommUtil.isEmpty(set)) {
return new ArrayList<>();
}


Notiek ielāde…
Atcelt
Saglabāt