feat: 后台管理员独立账号体系,Casdoor 配置改为后台管理

- 新增 admin_users/admin_sessions 表与 adminAuth 工具(scrypt 密码 + 独立会话 Cookie)
- /admin/init 初始化首个管理员,未初始化时服务端/客户端双守卫引导
- 后台鉴权改为管理员会话,前台 Casdoor 用户一律普通用户、与后台解耦
- Casdoor 配置改存 settings 表并由「统一认证」页管理,移除全部 CASDOOR 环境变量
- 侧边栏增加统一认证/管理员入口与登出;LoginModal 感知 SSO 启用状态
- 补充 adminAuth 测试,重写 casdoor 测试,全部 23 项通过
This commit is contained in:
2026-08-09 02:01:14 +08:00
parent 337eb4f05a
commit 541e24c6f4
42 changed files with 1505 additions and 307 deletions
+1
View File
@@ -315,6 +315,7 @@
"casdoorDescription": "Sign in with the unified identity provider",
"casdoorHint": "Click the button below to continue at the unified authentication center.",
"loginWithCasdoor": "Sign in with SSO",
"ssoDisabled": "Unified authentication is not enabled yet. Contact the administrator and try again later.",
"redirecting": "Redirecting to sign in",
"account": "Account",
"accountPlaceholder": "Username / Email / Phone",
+1
View File
@@ -315,6 +315,7 @@
"casdoorDescription": "使用统一身份认证,登录北极新站内账号",
"casdoorHint": "选择下方按钮,将跳转到统一身份认证中心完成登录。",
"loginWithCasdoor": "通过统一身份认证登录",
"ssoDisabled": "统一认证尚未启用,请联系管理员配置后再登录。",
"redirecting": "正在跳转登录…",
"account": "账号",
"accountPlaceholder": "用户名 / 邮箱 / 手机号",