mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-22 02:27:57 +00:00
The profile page posts the whole user object back, including roleId, deptId and status, because it renders from a full SysUser it fetched earlier. A caller editing their own record can therefore hand back a tampered roleId. Self-edits now reload those three fields from the database and ignore whatever the request carried. For an honest client this is a no-op - the values it sends are already its own - so the profile page keeps working unchanged. Claude-Session: https://claude.ai/code/session_01HPTAw8b8tAdFNFn8rKdPYx