多用户与角色:新增系统管理员 + 用户管理
- 新增 users 表(scrypt 口令哈希)与持久化层,启动兜底种子账号 - 登录改为后端用户表校验账号密码;JWT 带角色;保留无DB演示回退 - 新增系统管理员角色 + 用户管理页(增删改/改角色/启停/重置密码) - 用户管理端点按 系统管理员 角色强制校验(RBAC) - 各角色可建任意多个账号(多销售/多风控/多管理) - 更新登录页快速登录与首屏快照
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@
|
||||
import type { Context, Next } from 'hono';
|
||||
import { createHmac } from 'node:crypto';
|
||||
|
||||
export type AuthRole = '商务/销售' | '风控' | '管理层';
|
||||
export type AuthRole = '商务/销售' | '风控' | '管理层' | '系统管理员';
|
||||
|
||||
export interface AuthPayload {
|
||||
username: string;
|
||||
|
||||
Reference in New Issue
Block a user