|
@@ -8,7 +8,7 @@ import ( |
|
@@ -8,7 +8,7 @@ import ( |
8
|
type PermissionBase struct {
|
8
|
type PermissionBase struct {
|
9
|
CodeName string //模块标识
|
9
|
CodeName string //模块标识
|
10
|
ActionName string
|
10
|
ActionName string
|
11
|
- // MethodMap map[string]func()
|
11
|
+ MethodMap map[string]func()
|
12
|
}
|
12
|
}
|
13
|
|
13
|
|
14
|
var routerPermission = map[string]PermissionBase{
|
14
|
var routerPermission = map[string]PermissionBase{
|
|
@@ -24,16 +24,17 @@ var permissionObject = map[string]interface{}{ |
|
@@ -24,16 +24,17 @@ var permissionObject = map[string]interface{}{ |
24
|
|
24
|
|
25
|
//模块编号
|
25
|
//模块编号
|
26
|
const (
|
26
|
const (
|
27
|
- MENU_DEPARTMENT string = "OPPMG_DEPARTMENT" //公司部门管理模块
|
|
|
28
|
- MENU_POSITION string = "OPPMG_POSITION" //公司职务管理
|
|
|
29
|
- MENU_RBAC string = "OPPMG_RBAC" //员工角色/权限设置
|
|
|
30
|
- MENU_USER string = "OPPMG_USER" //公司员工管理
|
|
|
31
|
- MENU_ENTERPRISE_BASIC string = "OPPMG_ENTERPRISE_BASIC" //企业基础设置(大节点)
|
|
|
32
|
- MENU_SYSTEM_FUNCTION string = "OPPMG_SYSTEM_FUNCTION" //系统功能(大节点)
|
|
|
33
|
- MENU_CONMPANY string = "OPPMG_CONMPANY" //企业信息维护
|
|
|
34
|
- MENU_CHANCE_TEMP string = "OPPMG_CHANCE_TEMP" //机会模板管理
|
|
|
35
|
- MENU_SORCE string = "OPPMG_SORCE" //评分模式
|
|
|
36
|
- MENU_CHANCE string = "OPPMG_CHANCE" //机会管理
|
27
|
+ M_ENTERPRISE string = "ENTERPRISE" //企业基础设置
|
|
|
28
|
+ M_SYSTEM string = "SYSTEM" //系统设置
|
|
|
29
|
+ M_SYSTEM_OPPORTUNITY string = "SYSTEM_OPPORTUNITY" //机会管理
|
|
|
30
|
+ M_ENTERPRISE_PROFILE string = "ENTERPRISE_PROFILE" //企业信息维护
|
|
|
31
|
+ M_ENTERPRISE_ORGANIZATION string = "ENTERPRISE_ORGANIZATION" //组织架构设置
|
|
|
32
|
+ M_ENTERPRISE_EMPLOYEE_POST string = "ENTERPRISE_EMPLOYEE-POST" //员工职位设置
|
|
|
33
|
+ M_ENTERPRISE_EMPLOYEE_ROLE string = "ENTERPRISE_EMPLOYEE_ROLE" //员工角色/权限设置
|
|
|
34
|
+ M_ENTERPRISE_EMPLOYEE string = "ENTERPRISE_EMPLOYEE" //员工设置
|
|
|
35
|
+ M_SYSTEM_OPPORTUNITY_TEMPLATE string = "SYSTEM_OPPORTUNITY-TEMPLATE" //机会模板管理
|
|
|
36
|
+ M_SYSTEM_RATING string = "SYSTEM_RATING" //评分模式设置
|
|
|
37
|
+ M_SYSTEM_ANNOUNCEMENT string = "SYSTEM_ANNOUNCEMENT" //公告管理
|
37
|
)
|
38
|
)
|
38
|
|
39
|
|
39
|
type PermissionContentObject interface {
|
40
|
type PermissionContentObject interface {
|
|
@@ -62,18 +63,17 @@ func (p *PermissionContentBase) ObjectMarshal() (string, error) { |
|
@@ -62,18 +63,17 @@ func (p *PermissionContentBase) ObjectMarshal() (string, error) { |
62
|
return string(bt), err
|
63
|
return string(bt), err
|
63
|
}
|
64
|
}
|
64
|
|
65
|
|
65
|
-
|
|
|
66
|
type CodeToObject func() PermissionContentObject
|
66
|
type CodeToObject func() PermissionContentObject
|
67
|
|
67
|
|
68
|
var CodePermissionObject = map[string]CodeToObject{
|
68
|
var CodePermissionObject = map[string]CodeToObject{
|
69
|
- MENU_DEPARTMENT: NewPermissionContentBase, //公司部门管理模块
|
|
|
70
|
- MENU_POSITION: NewPermissionContentBase, //公司职务管理
|
|
|
71
|
- MENU_RBAC: NewPermissionContentBase, //员工角色/权限设置
|
|
|
72
|
- MENU_USER: NewPermissionContentBase, //公司员工管理
|
|
|
73
|
- MENU_ENTERPRISE_BASIC: NewPermissionContentBase, //企业基础设置(大节点)
|
|
|
74
|
- MENU_SYSTEM_FUNCTION: NewPermissionContentBase, //系统功能(大节点)
|
|
|
75
|
- MENU_CONMPANY: NewPermissionContentBase, //企业信息维护
|
|
|
76
|
- MENU_CHANCE_TEMP: NewPermissionContentBase, //机会模板管理
|
|
|
77
|
- MENU_SORCE: NewPermissionContentBase, //评分模式
|
|
|
78
|
- MENU_CHANCE: NewPermissionContentBase, //机会管理
|
69
|
+ M_ENTERPRISE_ORGANIZATION: NewPermissionContentBase, //公司组织架构设置
|
|
|
70
|
+ M_ENTERPRISE_EMPLOYEE_POST: NewPermissionContentBase, //公司职务管理
|
|
|
71
|
+ M_ENTERPRISE_EMPLOYEE_ROLE: NewPermissionContentBase, //员工角色/权限设置
|
|
|
72
|
+ M_ENTERPRISE_EMPLOYEE: NewPermissionContentBase, //公司员工管理
|
|
|
73
|
+ M_ENTERPRISE: NewPermissionContentBase, //企业基础设置(大节点)
|
|
|
74
|
+ M_SYSTEM: NewPermissionContentBase, //系统设置(大节点)
|
|
|
75
|
+ M_ENTERPRISE_PROFILE: NewPermissionContentBase, //企业信息维护
|
|
|
76
|
+ M_SYSTEM_OPPORTUNITY_TEMPLATE: NewPermissionContentBase, //机会模板管理
|
|
|
77
|
+ M_SYSTEM_RATING: NewPermissionContentBase, //评分模式
|
|
|
78
|
+ M_SYSTEM_OPPORTUNITY: NewPermissionContentBase, //机会管理
|
79
|
} |
79
|
} |