fix: (rbac) permission Privilege
This commit is contained in:
parent
2e939cee70
commit
9a6c9489f9
|
@ -40,10 +40,10 @@ type ConsolePermisson struct {
|
||||||
Menu []Menu `json:"menu"`
|
Menu []Menu `json:"menu"`
|
||||||
}
|
}
|
||||||
type Menu struct {
|
type Menu struct {
|
||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Permission []string `json:"permission,omitempty"`
|
Privilege []string `json:"privilege,omitempty"`
|
||||||
Children []Menu `json:"children,omitempty"`
|
Children []Menu `json:"children,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r ConsoleRole) ListPermission() interface{} {
|
func (r ConsoleRole) ListPermission() interface{} {
|
||||||
|
@ -68,20 +68,20 @@ func (r ConsoleRole) ListPermission() interface{} {
|
||||||
Name: "平台管理",
|
Name: "平台管理",
|
||||||
Children: []Menu{
|
Children: []Menu{
|
||||||
{
|
{
|
||||||
Id: "cluster_overview",
|
Id: "cluster_overview",
|
||||||
Name: "平台概览",
|
Name: "平台概览",
|
||||||
Permission: []string{"none", "write", "read"},
|
Privilege: []string{"none", "write", "read"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
||||||
Id: "cluster_elasticsearch",
|
Id: "cluster_elasticsearch",
|
||||||
Name: "集群监控",
|
Name: "集群监控",
|
||||||
Permission: []string{"none", "write", "read"},
|
Privilege: []string{"none", "write", "read"},
|
||||||
}, {
|
}, {
|
||||||
|
|
||||||
Id: "cluster_activities",
|
Id: "cluster_activities",
|
||||||
Name: "集群动态",
|
Name: "集群动态",
|
||||||
Permission: []string{"none", "write", "read"},
|
Privilege: []string{"none", "write", "read"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,9 +11,9 @@ type RolePermission struct {
|
||||||
Menu []Menu `json:"menu"`
|
Menu []Menu `json:"menu"`
|
||||||
}
|
}
|
||||||
type Menu struct {
|
type Menu struct {
|
||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Switch string `json:"switch"`
|
Privilege string `json:"privilege"`
|
||||||
}
|
}
|
||||||
type UpdateConsoleRole struct {
|
type UpdateConsoleRole struct {
|
||||||
Description string `json:"description" `
|
Description string `json:"description" `
|
||||||
|
|
|
@ -18,9 +18,9 @@ type ConsolePermission struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type Menu struct {
|
type Menu struct {
|
||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Permission string `json:"permission"`
|
Privilege string `json:"privilege"`
|
||||||
}
|
}
|
||||||
type ElasticsearchPermission struct {
|
type ElasticsearchPermission struct {
|
||||||
Cluster []string `json:"cluster" elastic_mapping:"cluster:{type:object}"`
|
Cluster []string `json:"cluster" elastic_mapping:"cluster:{type:object}"`
|
||||||
|
|
Loading…
Reference in New Issue