Repository navigation
refactor(auth): introduce permission annotation and super-admin flag - #151
Merged
Merged
Conversation
…per-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
- 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
|
Thank you for your contribution! We will review your request as soon as possible. Please review the code yourself using ponytail https://github.com/DietrichGebert/ponytail. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
related #150