merged the citizen and officer dashboard without the login - #13
Open
ClickCopyPaste wants to merge 8 commits into
Open
merged the citizen and officer dashboard without the login#13ClickCopyPaste wants to merge 8 commits into
ClickCopyPaste wants to merge 8 commits into
Conversation
…I configuration properties
…his account opens CitizenPortal
…d fix officer citations permission
…cle Carousel, Registry, Shared Vehicles) into CitizenPortal tabs
…tch, remove login Merges dev-ahkash (roadside penalty citation module) onto dev and resolves the integration problems that accumulated during the earlier merge attempts. Officer/citizen switching - An officer is also a citizen, so both portals are reachable from one session. Dashboard gains "My Citizen Portal", CitizenPortal gains "Officer Dashboard". - App.jsx routes on the active persona and remounts the portal on a switch, so no vehicles, citations or notifications leak between users. Login removed (being rebuilt separately) - Deleted Login.jsx, AuthController, LoginRequest, and the orphaned duplicate auth stack (JwtService, JwtAuthenticationFilter, JwtAuthFilter) that pointed at a SecurityConfig which no longer existed. - Added DevIdentityFilter: resolves identity from an X-User-Nic header and loads the user's real role from the database. Every SecurityContextHolder call in the 8 controllers and every authority rule in SecurityConfig keeps working unchanged, so the login rebuild is a one-file swap. - Kept JwtUtils: the 5-minute enforcement session token is the citation privacy lockout, not login, and must survive. Single identity source - Added identity.js. The Registry tab previously read a hardcoded persona NIC while the Citations tab read the JWT, so an officer switching to their citizen portal saw another citizen's vehicles. Both now read the same persona. - Moved PersonaSwitcherBar to App level so it is reachable from every portal (selecting the admin persona previously stranded you in AdminPortal). - services/api.js no longer auto-logs-in with a hardcoded password. Role cleanup - Role had six constants for three logical roles, forcing every check to enumerate all of them. Added toAuthority()/isLawEnforcement(); legacy spellings are kept deprecated for DB compatibility only. Port fixes (per portmap.txt) - server.port 8081 -> 8085; 8081 is the DRP mock API container. - gov.drp 8082 -> 8081 and gov.dmt 8083 -> 8082; both were off by one slot, with gov.dmt pointing at phpMyAdmin. - frontend api.js 8081 -> 8085; it was calling the DRP mock, not the backend. - jwt.5min.expiration was 31536000000 (1 year), not 5 minutes.
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.
No description provided.