PermissionTypeEnum.java from a466350665/smart-sso
// Source: https://github.com/a466350665/smart-sso | License: MIT | Copyright 2020 Joe
// Provided via justclaw.it.com; keep this notice with the code.
package openjoe.smart.sso.server.enums;
/**
* 权限类型(仅两种,数据库存英文值)
*
* @author Joe
*/
public enum PermissionTypeEnum {
/** 菜单 */
MENU("menu", "菜单"),
/** 功能(按钮/接口等非菜单权限) */
FUNCTION("function", "功能");
private final String value;
private final String desc;
PermissionTypeEnum(String value, String desc) {
this.value = value;
this.desc = desc;
}
public String getValue() {
return value;
}
public String getDesc() {
return desc;
}
/**
* 是否为合法权限类型(存库用的英文值)
*/
public static boolean isValid(String value) {
for (PermissionTypeEnum type : va
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key