Skip to content

DJ-91: Polish application footer (styling, product text, docs link) - #27

Open
devin-ai-integration[bot] wants to merge 2 commits into
migration/in-progressfrom
DJ-91/polish-footer
Open

DJ-91: Polish application footer (styling, product text, docs link)#27
devin-ai-integration[bot] wants to merge 2 commits into
migration/in-progressfrom
DJ-91/polish-footer

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

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 (footer key) and a Documentation link (routerLink="/admin/docs", footerDocs key)
  • New footer.scss (wired via styleUrl): 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 as navbar.scss
  • global.json: footer → "JHipster Sample Application — © 2026 Cognition Partner Workshops", new footerDocs → "Documentation"
  • main.spec.ts: added provideRouter([]) to the TestBed providers — required because the footer rendered inside Main now injects RouterLink

Verified: ./npmw run lint, ./npmw test (401 passed), and ./npmw run webapp:build:dev all pass; docs link navigates to Swagger UI at /admin/docs.

Before

before

After

after

Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/74f0efecab75481b8ff5c4cb1b4a7f0a

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

</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>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2633358 — the Documentation link is now gated with *jhiHasAnyAuthority="'ROLE_ADMIN'" (same convention as the navbar), so it only renders for admins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants