-
Notifications
You must be signed in to change notification settings - Fork 1
/
permissions_type.go
32 lines (28 loc) · 1.13 KB
/
permissions_type.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package xrole
import (
"github.com/webx-top/echo"
"github.com/admpub/nging/v5/application/library/perm"
"github.com/admpub/nging/v5/application/library/role"
)
var CustomerRolePermissionType = echo.NewKVData().
Add(CustomerRolePermissionTypePage, `页面权限`, echo.KVOptX(
perm.NewHandle().SetTmpl(`official/customer/role/edit_perm_page`).SetTmpl(`official/customer/role/edit_perm_page_foot`, `foot`).
SetGenerator(PermPageGenerator).
SetParser(PermPageParser).
SetChecker(PermPageChecker).
SetItemLister(PermPageList).
OnRender(PermPageOnRender),
)).
Add(CustomerRolePermissionTypeBehavior, `行为权限`, echo.KVOptX(
perm.NewHandle().SetTmpl(`official/customer/role/edit_perm_behavior`).SetTmpl(`official/customer/role/edit_perm_behavior_foot`, `foot`).
SetGenerator(PermBehaviorGenerator).
SetParser(PermBehaviorParser).
SetChecker(PermBehaviorChecker).
SetItemLister(PermBehaviorList).
OnRender(PermBehaviorOnRender).
SetIsValid(PermBehaviorIsValid),
))
const (
CustomerRolePermissionTypePage = role.RolePermissionTypePage
CustomerRolePermissionTypeBehavior = role.RolePermissionTypeBehavior
)