feat(mobile-api): admin guard on /api/admin/** (admin token, session state, module grants)

Ported from babyboo: @AdminModule, AdminModuleAccess, AdminSessionGuard and the
admin branch of AppAccessAspect. Adds the BO area, and services-auth findUserByToken
now returns no user for a logged-out token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
This commit is contained in:
ngqileandClaude Opus 5.5 committed 2026-11-26 19:44:03 +08:00
1 parent 72b724f468
commit 0a990cbcaf
16 files changed
+850 -8

No files matched your search

@@ -380,6 +380,10 @@ public class JwtAuthenticationController {
@RequestMapping({ "/findUserByToken/{area}/{token}" })
public User findUserByToken(@PathVariable("area") Area area, @PathVariable("token") String token) {
// A logged-out token (see logoutToken) resolves to no user.
if (redisUtil.getValue(token) != null) {
return null;
}
String username = jwtTokenUtil.getUsernameFromToken(token);
User user = null;