Skip to content

fix: correct admin nav label and Mentor Dashboard role gate - #809

Open
p3xz wants to merge 1 commit into
Women-Coding-Community:mainfrom
p3xz:fix/806-admin-nav-labels
Open

p3xz wants to merge 1 commit into
Women-Coding-Community:mainfrom
p3xz:fix/806-admin-nav-labels

Conversation

@p3xz

@p3xz p3xz commented Oct 5, 2026

Copy link
Copy Markdown

Fixes #806

Two small bugs in the admin nav bar:

  1. The top-level nav item linking to /admin was labeled "Dashboard"; it now reads "Home".
  2. The "Mentor Dashboard" link was rendered for any ADMIN user. It is now gated on the MENTOR role only (isMentor), so an ADMIN without the MENTOR role no longer sees it.

Also updates AdminLayout.test.tsx acceptance scenarios: ADMIN-only users must not see "Mentor Dashboard", and the no-roles scenario asserts the /^home$/i label.

Verified: npx jest __tests__/components/AdminLayout.test.tsx passes 5/5; the updated scenarios fail against the old component (2 failures), confirming the tests capture the bug. tsc --noEmit is clean.

…ding-Community#806)

The /admin nav item was labeled 'Dashboard' instead of 'Home', and the
'Mentor Dashboard' link was shown to any ADMIN user. Now the label reads
'Home' and the link only renders for users holding the MENTOR role.

Updates AdminLayout.test.tsx acceptance scenarios to match.
@sonarqubecloud

sonarqubecloud Bot commented Oct 5, 2026

Copy link
Copy Markdown

@Sowmiya07

Copy link
Copy Markdown
Contributor

@p3xz Thanks for picking this issue. Can you please include screenshots for local testing as well, please?

@Sowmiya07

Copy link
Copy Markdown
Contributor

@p3xz Will you please upload screenshots for us to unblock merging?

@goelsonali

Copy link
Copy Markdown
Contributor

@p3xz Adding screenshots and explaining how you can seed other types of member data.

Steps for setting up seed data - refer here (Run the all dependent applications with Docker)

After the change, when a MENTORSHIP ADMIN is logged in (who is not a MENTOR)
image

After the change, when a MENTOR is logged in
image
Mentor Dashboard
image

@Sowmiya07 - Can you confirm the behaviour for the MENTORSHIP page ( the user i logged in is mentorship-admin@wcc.dev, having role MENTORSHIP_ADMIN. As per the message can be a PLATFORM_LEADER , but when logging as leader@wcc.dev user with LEADER role, this page does not come for the LEADER role. (so we might need to fix the backend role for /recommendation API or allow Mentorship nav for LEADER role

image

This branch has not been deployed

No deployments
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.

bug: Admin nav bar shows wrong label and incorrect role gate for Mentor Dashboard

3 participants