Files
solution-erp/scripts
pqhuy1987 0e707891ff
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m6s
[CLAUDE] Scripts: rename 20 test user sang role-based naming (S22+3)
Bro feedback: "đổi tên thành roles luôn đi cho dễ test, để user ít nhầm lẫn"

20 user S22+2 đã rename:

Email pattern: {dept}.{level}@solutions.com.vn
  - act.nv / act.pp / act.tp
  - bod.1 / bod.2 (no hierarchy)
  - equ.nv / equ.pp / equ.tp
  - fin.nv / fin.pp / fin.tp
  - hra.nv / hra.pp / hra.tp
  - pm.nv / pm.pp / pm.tp
  - qs.nv / qs.pp / qs.tp

FullName pattern: "{DEPT} {LEVEL} - {Roles} [Flags]"
  - [Bypass] = CanBypassReview=true (act.tp, hra.tp)
  - [SkipFinal] = AllowDrafterSkipToFinal=true (fin.pp, pm.nv)

Identity rename pattern per gotcha #38 — 4 fields atomic UPDATE:
  Email + NormalizedEmail + UserName + NormalizedUserName + FullName.

Implementation:
- Build single SQL transaction 20 UPDATE
- SET QUOTED_IDENTIFIER ON (required filtered indexes Users)
- SCP file → SSH sqlcmd execute (avoid shell quote escape hell)

Verify:
- 20 rows UPDATE affected (1 mỗi user)
- Login test act.nv / TestUser@2026 → ACT NV - Drafter+Accounting OK
- NormalizedEmail + NormalizedUserName uppercase match Identity convention

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 22:09:10 +07:00
..