ymq
1b00876cc5
feat(register): 客户注册自动开账户
...
register_user 注册成功后旁路调 accounting.openCustomerAccounts('0', orgid),
模块未加载/开户失败只记日志不阻断注册。库名经 get_module_dbname 跨应用解析。
2026-08-26 18:10:34 +08:00
f5b9d697b3
security: 移除 /rbac/add_superuser.dspy 未授权超管创建后门
...
该端点被授权给 any 角色且文件内零鉴权:任何未登录者裸调 URL 即可创建
superuser/111111(角色 owner.superuser+admin)→ 登录后完全接管平台
→ 经 agent run_shell/终端可达 RCE。等同奇安信 QVD-2026-57410(DSH 9.8) 危害。
超管初始化改为部署期本地 CLI(宿主应用 scripts/create_superuser.py),
不再经 HTTP 暴露。load_path.py 同步移除该路径注册。
2026-08-25 14:46:50 +08:00
a0b200c459
feat(rbac): 注册开关 register_open 检查(appbase params 表,0=关闭注册)
2026-08-21 19:19:16 +08:00
77c17f6374
refactor(rbac): 删除 userapp/userdepartment 两张废弃表(无业务读写,预留未启用)
...
- 删 models/json 的 userapp/userdepartment 定义 + xlsx
- script/init.py rbac_tables 移除两表
- scripts/load_path.py 移除路径注册
- .gitignore 移除对应条目
2026-08-21 18:33:21 +08:00
2a020e17e9
fix(rbac): find_unauth_files 用 ref_real_path 替代 __file__ + seed user_status 字典(init/data.json)
2026-08-21 17:09:51 +08:00
a72d7ef112
feat(rbac): 登录检查refer,非用户点击登录成功后不刷新页面
...
- login.ui 密码/手机登录透传 login_source
- up_login 条件化 /index.ui 跳转(仅主动登录刷新)
- code_login 三处登录分支收敛 _login_msg,auto 时不 dispatch
2026-08-20 14:41:18 +08:00
3e21ee6e6e
feat(rbac): 生产 users 表结构对齐幂等 ALTER 脚本(登录审计+账户锁定依赖)
2026-08-17 16:05:27 +08:00
fe2a3a6ab1
fix(rbac): 固化非促销码注册创建自由客户归属记录(bind_type=3)
2026-08-17 15:51:32 +08:00
395ac8618a
fix(rbac): 固化 users 表结构修正 migration
...
pipeline 库 users 表早期手工建错(last_login_fail NOT NULL),
导致成功登录 SET last_login_fail=NULL 被转成时间戳。
新增 migration/fix_users_schema.sql 对齐 models 定义:
- created_at timestamp→date
- last_login/last_login_fail NOT NULL→NULL DEFAULT NULL
- login_fail_count int→smallint NOT NULL
- 幂等补 sync_from 列
2026-08-16 19:04:32 +08:00
2966993088
fix(rbac): 账户锁定场景补 login_fail 审计(result=locked)
...
up_login.dspy 锁定分支(fail_count>=3 且 5分钟内)之前直接 return,未写审计。
补 _audit_login(..., 'login_fail', 'locked'),补全失败登录审计三路径:
用户不存在/密码错误/账户锁定。
2026-08-16 18:28:12 +08:00
15e27968da
fix(rbac): user/up_login.dspy 登录审计 + 失败5分钟窗口计数
2026-08-16 17:47:49 +08:00
8b00a5618c
feat(rbac): 登录审计 + 登录失败按5分钟窗口计数
2026-08-16 17:08:02 +08:00
24faae3978
feat(rbac): Redis L2 cache for permission checks
...
- load_roleperms: store role_perms to Redis (sc:rbac:role_perms, TTL=600s)
- get_userroles: store user roles to Redis (sc:rbac:user_roles:{userid}, TTL=300s)
- is_user_has_path_perm: check Redis L2 cache before opening DB connection
- Convert rp_caches values from list to set for O(1) path lookup
- Add cache_invalidate() to 7 event handlers for cross-worker invalidation via Pub/Sub
2026-08-06 14:42:22 +08:00
13ae4e89c8
refactor: import share_cache for future rbac cache migration
2026-07-29 17:16:26 +08:00
f398f70142
chore: 从仓库中删除 CRUD 自动生成目录,添加 .gitignore
2026-07-17 14:35:07 +08:00
a4f1ff6a88
fix(rbac): userrole CRUD roleid display — align valueField/textField with data columns
2026-07-16 18:06:20 +08:00
cc245f4721
fix: get_search_roleid return all roles so code uitype resolves display text correctly
2026-07-16 17:34:20 +08:00
be26c6db98
feat: allow same phone number to register multiple users
2026-07-16 16:21:36 +08:00
ed837dcd4e
fix(rbac): gen_sms_code.dspy — remove TEST MODE, call sms_engine directly
2026-07-16 15:50:04 +08:00
6c9d127759
fix(rbac): gen_sms_code.dspy falls back to test mode when sms_engine unavailable
2026-07-16 15:43:06 +08:00
bffd8b200d
fix(rbac): gen_sms_code.dspy calls real sms_engine.generate_sms_code() instead of TEST MODE stub
2026-07-16 15:40:51 +08:00
5d9292c6f6
fix: create_org兜底orgname为空时用id填充
2026-07-14 12:03:50 +08:00
cf4283ff0d
fix: align get_search_roleid + userrole alters to value/text fields matching index.ui
2026-07-13 12:59:36 +08:00
e1abe0bb71
fix: role dropdown filter by user org_type, add get_search_roleid.dspy
2026-07-13 11:27:21 +08:00
18913e7064
feat: domain-based reseller binding on registration + test SMS bypass
2026-07-10 11:24:25 +08:00
35750d5938
fix: 改用event.params.text直接取值,不用${text}占位符
2026-07-06 14:04:32 +08:00
a526a2222d
fix: newwindow缺referer_widget,改用script+window.open()
2026-07-06 14:03:58 +08:00
4a649aa98f
fix: urlwidget+PopupWindow无法替换${text},改用newwindow+window.open()
2026-07-06 14:00:41 +08:00
190e4e435f
fix: $ → ,多余$导致变量未被替换
2026-07-06 13:57:57 +08:00
acdabe4c33
扫码结果改为弹新窗口(PopupWindow)展示,不再替换当前页面
...
root.page_center → PopupWindow,扫码后弹出 85% 新窗口打开链接内容
2026-07-06 13:47:39 +08:00
2c986dca13
fix: CRUD endpoint return format - remove json.dumps, use widgettype format
2026-07-03 14:50:52 +08:00
1e2897d8d4
fix: enable/disable 后自动刷新表格 + 捕获真实错误
...
1. record_toolbar 添加 name 字段 (enable_user/disable_user)
2. 新增 binds: script bind 用 fetch 调用 dspy,成功后 render() 刷新
3. api/add_user.dspy + api/update_user.dspy 用 try/except 捕获真实异常
2026-06-29 15:50:18 +08:00
5ddbf299bf
feat: 注册 api/add_user.dspy 和 api/update_user.dspy RBAC 权限
2026-06-29 15:19:45 +08:00
ad601403cf
feat: users CRUD 定制 api — 新增/编辑客制化逻辑
...
不修改生成文件,改为 json/users.json 指定 custom URLs:
- new_data_url → /rbac/api/add_user.dspy
- update_data_url → /rbac/api/update_user.dspy
客制化修复:
1. 新增用户: created_at 默认当天日期
2. 新增/编辑: 清除 Tabular 发送的 _text 后缀字段
3. 编辑: 密码为空时不覆盖原密码
2026-06-29 15:12:33 +08:00
9472c0995f
Revert "fix: users CRUD — 三个修复"
...
This reverts commit 449a0415a5ffe4237fb118e17bcc38b1bba51876.
2026-06-29 15:10:17 +08:00
449a0415a5
fix: users CRUD — 三个修复
...
1. add_users.dspy: 新增用户时 created_at 默认设为当天日期
2. add/update: 清除 Tabular 发送的 _text 后缀字段
(user_status_text, orgid_text 等不是真实列,会导致 sor.U/C 失败)
3. update_users.dspy: 密码为空时从 ns 中移除,避免覆盖为空白
2026-06-29 14:46:58 +08:00
Hermes Agent
70a19238c1
feat: 注册时检查促销码并绑定客户归属关系
...
- register.dspy: 用户名密码注册后检查promo_code_id
- sms_register.dspy: 短信注册后检查promo_code_id
- code_login.dspy: 验证码登录/自动注册后检查promo_code_id
- phone_login.dspy: 手机登录/自动注册后检查promo_code_id
- 绑定失败只记日志不影响注册成功(try/except)
2026-06-24 00:56:33 +08:00
Hermes Agent
600fddced3
feat: add i18n translations (zh/en/jp/ko) for all modules
2026-06-19 15:01:37 +08:00
Hermes Agent
2ea45cd380
rbac: 完善信息弹窗修复双窗口+添加标题
2026-06-18 11:09:46 +08:00
Hermes Agent
947638853f
rbac: 完善信息Form使用value回填用户数据
2026-06-18 10:48:17 +08:00
Hermes Agent
cd29b276f7
fix: add login.css to any permissions
2026-06-15 13:55:09 +08:00
18251e3eae
fix: add favicon.ico and i18n_getmsgs to any permissions
2026-06-11 23:54:17 +08:00
d1b81c9a9f
fix: remove Sage dependency from load_path.py, use standard pattern
2026-06-11 23:41:10 +08:00
52cd71f861
feat: add user_status check on login, enable/disable toolbar, fix editexclouded for add user
2026-06-11 16:57:04 +08:00
cb9f8bbb4b
bugfix
2026-06-10 11:16:23 +08:00
12663a37e0
bugfix
2026-06-10 11:08:33 +08:00
f6027788b2
fix: login redirect to index.ui instead of userinfo.ui
...
After login success, redirect to the main page (/index.ui)
instead of just loading userinfo.ui into user_container.
This fixes the white screen after login.
2026-06-09 23:18:39 +08:00
587241b6a9
bugfix
2026-06-09 17:01:27 +08:00
62e1985ecb
bugfix
2026-06-09 16:58:15 +08:00
df212ea40d
bugfix
2026-06-09 16:52:12 +08:00