DJ-91: Polish application footer (styling, product text, docs link) - #27
DJ-91: Polish application footer (styling, product text, docs link)#27devin-ai-integration[bot] wants to merge 2 commits into
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
| </div> | ||
| <footer class="footer"> | ||
| <p class="footer-text" jhiTranslate="footer">JHipster Sample Application — © 2026 Cognition Partner Workshops</p> | ||
| <a class="footer-link" routerLink="/admin/docs" jhiTranslate="footerDocs">Documentation</a> |
There was a problem hiding this comment.
🟡 Documentation link in the footer is shown to everyone but only works for administrators
The footer always shows a Documentation link pointing to an administrator-only page (routerLink="/admin/docs" at src/main/webapp/app/layouts/footer/footer.html:3), so ordinary visitors who click it are bounced to the sign-in page or an access-denied page instead of any documentation.
Impact: Anonymous and non-admin users see a link that never works, losing their current page context when they click it.
Route guard and existing visibility conventions
The /admin route tree is protected by UserRouteAccessService with Authority.ADMIN (src/main/webapp/app/app.routes.ts:20-26). For an anonymous user the guard stores the URL and navigates to /login (src/main/webapp/app/core/auth/user-route-access.service.ts:29-31); for an authenticated non-admin it navigates to accessdenied.
The existing convention elsewhere is to hide such links: the navbar's API docs entry lives inside the admin dropdown gated by *jhiHasAnyAuthority="'ROLE_ADMIN'" (src/main/webapp/app/layouts/navbar/navbar.html:147). The new footer link has no such guard, so it renders on every page for every visitor.
Prompt for agents
The new footer renders a Documentation link to /admin/docs unconditionally, but that route is guarded by UserRouteAccessService requiring ROLE_ADMIN (src/main/webapp/app/app.routes.ts). Non-admin/anonymous users clicking it get redirected to /login or accessdenied. Either gate the link the same way the navbar does (HasAnyAuthorityDirective, *jhiHasAnyAuthority="'ROLE_ADMIN'", see src/main/webapp/app/layouts/navbar/navbar.html) or point the footer link at a publicly reachable documentation target.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Fixed in 2633358 — the Documentation link is now gated with *jhiHasAnyAuthority="'ROLE_ADMIN'" (same convention as the navbar), so it only renders for admins.
Summary
Resolves DJ-91: replaces the placeholder "This is your footer" with a polished product footer.
footer.html: semantic<footer class="footer">with i18n-driven product text (footerkey) and a Documentation link (routerLink="/admin/docs",footerDocskey)footer.scss(wired viastyleUrl): muted, centred, small text with top border and padding, using Bootstrap 5 theme variables ($border-color,$font-size-sm,$text-muted,$secondary) — same import pattern asnavbar.scssglobal.json:footer→ "JHipster Sample Application — © 2026 Cognition Partner Workshops", newfooterDocs→ "Documentation"main.spec.ts: addedprovideRouter([])to the TestBed providers — required because the footer rendered insideMainnow injectsRouterLinkVerified:
./npmw run lint,./npmw test(401 passed), and./npmw run webapp:build:devall pass; docs link navigates to Swagger UI at/admin/docs.Before
After
Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/74f0efecab75481b8ff5c4cb1b4a7f0a