You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8d19cf2
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(auth): introduce permission annotation and super-admin flag (#151)
* refactor: add dependencies version properties
* refactor(auth): replace @adminonly with @RequirePermission and add super-admin flag
- Rename @adminonly to @RequirePermission with a PermissionEnum[] placeholder
(role/business-type authorization tracked in Issue #150)
- Add sys_user.is_super_admin across entity/UserContext/DTO/Mapper/SQL and
migration_compatibility.sql; UserContext now carries superAdmin
- AuthInterceptor: bypass when no permission annotation, skip checks for the
super admin, otherwise delegate to checkPermission
- AdminBootstrapRunner: seed initial super admin (role_id=0, is_super_admin=1)
and use existUser() instead of countAll(); remove RoleBootstrapRunner
- Move selectAuthProjection from SysUserMapper up to SysUserService
- Frontend: show a 'super admin' tag in the user management page
- Chore: ignore *.factorypath, add tracing TODO note in TraceIdFilter
* fix(auth): reject disabled or missing users on every endpoint
- Validate selectById result in selectAuthProjection and return null when
status != 1, restoring the previous behavior
- Move the null/401 check in AuthInterceptor ahead of UserContext.set and the
no-annotation bypass, so disabled/deleted users cannot reach any endpoint
- Refresh docs for @RequirePermission, the super-admin flag, and admin bootstrap
0 commit comments