mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2025-12-08 17:12:28 +08:00
授权首页菜单后,自定义首页功能不生效 #3069
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
package org.jeecg.common.constant.enums;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 首页自定义
|
||||
* 通过角色编码与首页组件路径配置
|
||||
@ -64,6 +66,17 @@ public enum RoleIndexConfigEnum {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getIndexByRoles(List<String> roles) {
|
||||
for (String role : roles) {
|
||||
for (RoleIndexConfigEnum e : RoleIndexConfigEnum.values()) {
|
||||
if (e.roleCode.equals(role)) {
|
||||
return e.componentUrl;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getRoleCode() {
|
||||
return roleCode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user