...
|
...
|
@@ -8,7 +8,7 @@ import ( |
|
|
type PermissionBase struct {
|
|
|
CodeName string //模块标识
|
|
|
ActionName string
|
|
|
// MethodMap map[string]func()
|
|
|
MethodMap map[string]func()
|
|
|
}
|
|
|
|
|
|
var routerPermission = map[string]PermissionBase{
|
...
|
...
|
@@ -24,16 +24,17 @@ var permissionObject = map[string]interface{}{ |
|
|
|
|
|
//模块编号
|
|
|
const (
|
|
|
MENU_DEPARTMENT string = "OPPMG_DEPARTMENT" //公司部门管理模块
|
|
|
MENU_POSITION string = "OPPMG_POSITION" //公司职务管理
|
|
|
MENU_RBAC string = "OPPMG_RBAC" //员工角色/权限设置
|
|
|
MENU_USER string = "OPPMG_USER" //公司员工管理
|
|
|
MENU_ENTERPRISE_BASIC string = "OPPMG_ENTERPRISE_BASIC" //企业基础设置(大节点)
|
|
|
MENU_SYSTEM_FUNCTION string = "OPPMG_SYSTEM_FUNCTION" //系统功能(大节点)
|
|
|
MENU_CONMPANY string = "OPPMG_CONMPANY" //企业信息维护
|
|
|
MENU_CHANCE_TEMP string = "OPPMG_CHANCE_TEMP" //机会模板管理
|
|
|
MENU_SORCE string = "OPPMG_SORCE" //评分模式
|
|
|
MENU_CHANCE string = "OPPMG_CHANCE" //机会管理
|
|
|
M_ENTERPRISE string = "ENTERPRISE" //企业基础设置
|
|
|
M_SYSTEM string = "SYSTEM" //系统设置
|
|
|
M_SYSTEM_OPPORTUNITY string = "SYSTEM_OPPORTUNITY" //机会管理
|
|
|
M_ENTERPRISE_PROFILE string = "ENTERPRISE_PROFILE" //企业信息维护
|
|
|
M_ENTERPRISE_ORGANIZATION string = "ENTERPRISE_ORGANIZATION" //组织架构设置
|
|
|
M_ENTERPRISE_EMPLOYEE_POST string = "ENTERPRISE_EMPLOYEE-POST" //员工职位设置
|
|
|
M_ENTERPRISE_EMPLOYEE_ROLE string = "ENTERPRISE_EMPLOYEE_ROLE" //员工角色/权限设置
|
|
|
M_ENTERPRISE_EMPLOYEE string = "ENTERPRISE_EMPLOYEE" //员工设置
|
|
|
M_SYSTEM_OPPORTUNITY_TEMPLATE string = "SYSTEM_OPPORTUNITY-TEMPLATE" //机会模板管理
|
|
|
M_SYSTEM_RATING string = "SYSTEM_RATING" //评分模式设置
|
|
|
M_SYSTEM_ANNOUNCEMENT string = "SYSTEM_ANNOUNCEMENT" //公告管理
|
|
|
)
|
|
|
|
|
|
type PermissionContentObject interface {
|
...
|
...
|
@@ -62,18 +63,17 @@ func (p *PermissionContentBase) ObjectMarshal() (string, error) { |
|
|
return string(bt), err
|
|
|
}
|
|
|
|
|
|
|
|
|
type CodeToObject func() PermissionContentObject
|
|
|
|
|
|
var CodePermissionObject = map[string]CodeToObject{
|
|
|
MENU_DEPARTMENT: NewPermissionContentBase, //公司部门管理模块
|
|
|
MENU_POSITION: NewPermissionContentBase, //公司职务管理
|
|
|
MENU_RBAC: NewPermissionContentBase, //员工角色/权限设置
|
|
|
MENU_USER: NewPermissionContentBase, //公司员工管理
|
|
|
MENU_ENTERPRISE_BASIC: NewPermissionContentBase, //企业基础设置(大节点)
|
|
|
MENU_SYSTEM_FUNCTION: NewPermissionContentBase, //系统功能(大节点)
|
|
|
MENU_CONMPANY: NewPermissionContentBase, //企业信息维护
|
|
|
MENU_CHANCE_TEMP: NewPermissionContentBase, //机会模板管理
|
|
|
MENU_SORCE: NewPermissionContentBase, //评分模式
|
|
|
MENU_CHANCE: NewPermissionContentBase, //机会管理
|
|
|
M_ENTERPRISE_ORGANIZATION: NewPermissionContentBase, //公司组织架构设置
|
|
|
M_ENTERPRISE_EMPLOYEE_POST: NewPermissionContentBase, //公司职务管理
|
|
|
M_ENTERPRISE_EMPLOYEE_ROLE: NewPermissionContentBase, //员工角色/权限设置
|
|
|
M_ENTERPRISE_EMPLOYEE: NewPermissionContentBase, //公司员工管理
|
|
|
M_ENTERPRISE: NewPermissionContentBase, //企业基础设置(大节点)
|
|
|
M_SYSTEM: NewPermissionContentBase, //系统设置(大节点)
|
|
|
M_ENTERPRISE_PROFILE: NewPermissionContentBase, //企业信息维护
|
|
|
M_SYSTEM_OPPORTUNITY_TEMPLATE: NewPermissionContentBase, //机会模板管理
|
|
|
M_SYSTEM_RATING: NewPermissionContentBase, //评分模式
|
|
|
M_SYSTEM_OPPORTUNITY: NewPermissionContentBase, //机会管理
|
|
|
} |
...
|
...
|
|