refactor: 系统权限模块重构,迁移至PostgreSQL并对齐新设计
- 切换数据库为PostgreSQL,更新依赖与配置 - 重构权限体系,使用sys_user/sys_role/sys_menu等新实体替代旧模型 - 移除旧的用户角色/权限/系统设置相关代码与实体 - 新增字典、菜单管理模块与基础CRUD接口 - 优化鉴权逻辑,基于菜单权限标识进行接口校验 - 前端同步更新API、路由与权限控制逻辑 - 删除冗余的v-permission指令与相关代码
This commit is contained in:
1 parent
98c22f6afb
commit
0a8103f33d
67 files changed
+3263
-1924
No files matched your search
@@ -11,12 +11,12 @@ export default {
|
||||
sequelize: {
|
||||
dataSource: {
|
||||
default: {
|
||||
dialect: "mysql",
|
||||
host: process.env.MYSQL_HOST || "localhost",
|
||||
port: Number(process.env.MYSQL_PORT) || 3306,
|
||||
database: process.env.MYSQL_DATABASE || "smart_grid_iot",
|
||||
username: process.env.MYSQL_USERNAME || "root",
|
||||
password: process.env.MYSQL_PASSWORD || "123",
|
||||
dialect: "postgres",
|
||||
host: process.env.PG_HOST || "localhost",
|
||||
port: Number(process.env.PG_PORT) || 5432,
|
||||
database: process.env.PG_DATABASE || "xintong",
|
||||
username: process.env.PG_USERNAME || "postgres",
|
||||
password: process.env.PG_PASSWORD || "postgres",
|
||||
timezone: "+08:00",
|
||||
models: [join(__dirname, "../entity")],
|
||||
define: {
|
||||
@@ -62,22 +62,5 @@ export default {
|
||||
csrf: {
|
||||
enable: false
|
||||
}
|
||||
},
|
||||
|
||||
middleware: ["authMiddleware", "rbacMiddleware", "logMiddleware"],
|
||||
|
||||
middlewareConfig: {
|
||||
authMiddleware: {
|
||||
match: "/api/**",
|
||||
ignore: ["/api/auth/**", "/api/health"]
|
||||
},
|
||||
rbacMiddleware: {
|
||||
match: "/api/**",
|
||||
ignore: ["/api/auth/**", "/api/health", "/api/dashboard/**"]
|
||||
},
|
||||
logMiddleware: {
|
||||
match: "/api/**",
|
||||
ignore: ["/api/logs/**", "/api/health", "/api/auth/login"]
|
||||
}
|
||||
}
|
||||
} as MidwayConfig;
|
||||
@@ -1,5 +1,5 @@
|
||||
export default {
|
||||
sequelize: {
|
||||
sync: true,
|
||||
sync: false,
|
||||
},
|
||||
};
|
||||
Reference in new issue
Block a user