fix: 权限列表JSON字段与角色可编辑; 前台site_id与SPA; 首页积木扩展区
Made-with: Cursor
This commit is contained in:
@@ -14,21 +14,24 @@ const (
|
||||
PermRolePermission = "role:permission" // 角色权限管理
|
||||
)
|
||||
|
||||
// PermissionItem 单条权限定义(JSON 须用小写 key/name,供前端展示与勾选)
|
||||
type PermissionItem struct {
|
||||
Key string `json:"key"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// AllPermissions 所有可配置权限(用于角色权限管理页)
|
||||
var AllPermissions = []struct {
|
||||
Key string
|
||||
Name string
|
||||
}{
|
||||
{PermSiteManage, "站点管理"},
|
||||
{PermHomepageEdit, "首页编辑"},
|
||||
{PermPageManage, "网页管理"},
|
||||
{PermModuleUpload, "功能模块上传"},
|
||||
{PermUserManage, "用户管理"},
|
||||
{PermWorkspaceManage, "工作空间"},
|
||||
{PermConversationManage, "对话管理"},
|
||||
{PermSMSConfig, "短信配置"},
|
||||
{PermPaymentConfig, "支付配置"},
|
||||
{PermRolePermission, "角色权限管理"},
|
||||
var AllPermissions = []PermissionItem{
|
||||
{Key: PermSiteManage, Name: "站点管理"},
|
||||
{Key: PermHomepageEdit, Name: "首页编辑"},
|
||||
{Key: PermPageManage, Name: "网页管理"},
|
||||
{Key: PermModuleUpload, Name: "功能模块上传"},
|
||||
{Key: PermUserManage, Name: "用户管理"},
|
||||
{Key: PermWorkspaceManage, Name: "工作空间"},
|
||||
{Key: PermConversationManage, Name: "对话管理"},
|
||||
{Key: PermSMSConfig, Name: "短信配置"},
|
||||
{Key: PermPaymentConfig, Name: "支付配置"},
|
||||
{Key: PermRolePermission, Name: "角色权限管理"},
|
||||
}
|
||||
|
||||
// RolePermissionsDoc MongoDB 文档:角色 ID -> 名称与权限列表(支持自定义角色)
|
||||
|
||||
Reference in New Issue
Block a user