You've already forked DataMate
feat(auth): 完善API网关JWT认证和权限控制功能
- 实现网关侧JWT工具类和权限规则匹配器 - 集成JWT认证流程,支持Bearer Token验证 - 添加基于路径和HTTP方法的权限控制机制 - 配置白名单路由规则,优化认证性能 - 更新前端受保护路由组件,实现权限验证 - 添加403禁止访问页面和权限检查逻辑 - 重构登录页面,集成实际认证API调用 - 实现用户信息获取和权限加载功能 - 优化全局异常处理器中的认证错误状态码 - 集成FastJSON2和JJWT依赖库支持
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
// Store,
|
||||
// Merge,
|
||||
} from "lucide-react";
|
||||
import { PermissionCodes } from "@/auth/permissions";
|
||||
|
||||
export const menuItems = [
|
||||
// {
|
||||
@@ -26,6 +27,7 @@ export const menuItems = [
|
||||
id: "management",
|
||||
title: "数集管理",
|
||||
icon: FolderOpen,
|
||||
permissionCode: PermissionCodes.dataManagementRead,
|
||||
description: "创建、导入和管理数据集",
|
||||
color: "bg-blue-500",
|
||||
},
|
||||
@@ -33,6 +35,7 @@ export const menuItems = [
|
||||
id: "annotation",
|
||||
title: "数据标注",
|
||||
icon: Tag,
|
||||
permissionCode: PermissionCodes.dataAnnotationRead,
|
||||
description: "对数据进行标注和标记",
|
||||
color: "bg-green-500",
|
||||
},
|
||||
@@ -40,6 +43,7 @@ export const menuItems = [
|
||||
id: "content-generation",
|
||||
title: "内容生成",
|
||||
icon: Sparkles,
|
||||
permissionCode: PermissionCodes.contentGenerationUse,
|
||||
description: "智能内容生成与创作",
|
||||
color: "bg-purple-500",
|
||||
},
|
||||
@@ -47,6 +51,7 @@ export const menuItems = [
|
||||
id: "knowledge-management",
|
||||
title: "知识管理",
|
||||
icon: Shield,
|
||||
permissionCode: PermissionCodes.knowledgeManagementRead,
|
||||
description: "管理知识集与知识条目",
|
||||
color: "bg-indigo-500",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user