fix:创建用户初始化权限,确保用户可用
修改了: - server/api/v1/sys_authority.go - server/model/request/sys_casbin.go - server/model/request/sys_menu.go
This commit is contained in:
@@ -11,3 +11,7 @@ type CasbinInReceive struct {
|
||||
AuthorityId string `json:"authorityId"` // 权限id
|
||||
CasbinInfos []CasbinInfo `json:"casbinInfos"`
|
||||
}
|
||||
|
||||
func DefaultCasbin() []CasbinInfo {
|
||||
return []CasbinInfo{{Path: "/menu/getMenu", Method: "POST"}, {Path: "/jwt/jsonInBlacklist", Method: "POST"}}
|
||||
}
|
||||
|
@@ -1,9 +1,25 @@
|
||||
package request
|
||||
|
||||
import "gin-vue-admin/model"
|
||||
import (
|
||||
"gin-vue-admin/model"
|
||||
)
|
||||
|
||||
// Add menu authority info structure
|
||||
type AddMenuAuthorityInfo struct {
|
||||
Menus []model.SysBaseMenu
|
||||
AuthorityId string // 角色ID
|
||||
}
|
||||
|
||||
func DefaultMenu() []model.SysBaseMenu {
|
||||
return []model.SysBaseMenu{{
|
||||
ParentId: "0",
|
||||
Path: "dashboard",
|
||||
Name: "dashboard",
|
||||
Component: "view/dashboard/index.vue",
|
||||
Sort: 1,
|
||||
Meta: model.Meta{
|
||||
Title: "仪表盘",
|
||||
Icon: "setting",
|
||||
},
|
||||
}}
|
||||
}
|
||||
|
Reference in New Issue
Block a user