Skip to content

fix: hide-roles-tab-only-for-non-org-admin-in-env-project-settings#6786

Open
Zaimwa9 wants to merge 2 commits intomainfrom
fix/project-admin-should-be-able-to-see-project-permissions
Open

fix: hide-roles-tab-only-for-non-org-admin-in-env-project-settings#6786
Zaimwa9 wants to merge 2 commits intomainfrom
fix/project-admin-should-be-able-to-see-project-permissions

Conversation

@Zaimwa9
Copy link
Contributor

@Zaimwa9 Zaimwa9 commented Feb 26, 2026

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

The Permissions tab on Project Settings was completely inaccessible for users who are project admins but not organisation admins.
It shows Error loading permissions data because GET /roles would fail and block the entire access

Cause: We fetch organisation roles (GET /organisations/{id}/roles/), which requires org admin access

In environment settings we had 2 problems:

  • the same issue was not blocking the whole access but showing You currently have no roles
  • Wrong matching between roles and environment permissions would show the same error for org admins

How did you test this code?

https://www.loom.com/share/354350c688fa487cbca57a466031cc52

@Zaimwa9 Zaimwa9 requested a review from a team as a code owner February 26, 2026 09:37
@Zaimwa9 Zaimwa9 requested review from talissoncosta and removed request for a team February 26, 2026 09:37
@vercel
Copy link

vercel bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview, Comment Feb 26, 2026 0:21am
flagsmith-frontend-staging Ready Ready Preview, Comment Feb 26, 2026 0:21am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Feb 26, 2026 0:21am

Request Review

@github-actions github-actions bot added front-end Issue related to the React Front End Dashboard fix labels Feb 26, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 26, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-6786 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-6786 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-6786 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-6786 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-6786 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-6786 Finished ✅ Results

permissions={permissionsData || []}
onSaveUser={handleSaveUser}
/>
<>
Copy link
Contributor

Choose a reason for hiding this comment

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

just a quick question: do we need this wrapper in here ?

Copy link
Contributor Author

@Zaimwa9 Zaimwa9 Feb 26, 2026

Choose a reason for hiding this comment

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

Not at all, it's an artifact from local twisting, i'll fix 😅

@Zaimwa9
Copy link
Contributor Author

Zaimwa9 commented Feb 26, 2026

@talissoncosta I got interrupted while filling the PR. I added a full loom comparing before / after on prod and local for better context

Copy link
Contributor

@talissoncosta talissoncosta left a comment

Choose a reason for hiding this comment

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

Looks good @Zaimwa9. Good job, thanks for handling it!

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

Labels

fix front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants