mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-22 18:37:43 +00:00
The scope is decided by the user id, the role id, the department and the data_scope string. Three of the four were already in the token; deptid was not, though core's user.GetDeptId has always read that claim. Adding it removes a sys_user join from every list, detail, update and delete. This goes no more stale than rolekey does, which Casbin has read from the token since the beginning: both settle on the next login. A token minted before this still works. Its claims are incomplete, and the lookup runs for it as before.