Skip to content

feat: Inspect Permissions - 🔴 Blocked by #5408 #5375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

tiagoapolo
Copy link
Contributor

@tiagoapolo tiagoapolo commented Apr 23, 2025

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

  • 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?
  • I have used a Conventional Commit title for this Pull Request

Changes

⚠️ 5408 needs to be merged first

Ref: #5064

How did you test this code?

Screenshot 2025-04-23 at 09 59 39 Screenshot 2025-04-23 at 09 59 33 Screenshot 2025-04-23 at 09 59 26

Copy link

vercel bot commented Apr 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 3:35pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 3:35pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview May 12, 2025 3:35pm

Copy link
Contributor

github-actions bot commented May 2, 2025

Uffizzi Ephemeral Environment Deploying

☁️ https://app.uffizzi.com/github.com/Flagsmith/flagsmith/pull/5375

⚙️ Updating now by workflow run 14926861786.

What is Uffizzi? Learn more!

@tiagoapolo tiagoapolo force-pushed the feat/readonly-user-permissions-5308 branch from 587305e to 4fc81ad Compare May 7, 2025 23:05
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels May 7, 2025
@tiagoapolo tiagoapolo marked this pull request as ready for review May 8, 2025 13:04
@tiagoapolo tiagoapolo requested a review from a team as a code owner May 8, 2025 13:04
@tiagoapolo tiagoapolo requested review from Zaimwa9 and removed request for a team May 8, 2025 13:04
Copy link
Contributor

github-actions bot commented May 8, 2025

Docker builds report

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

@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels May 8, 2025
@Zaimwa9 Zaimwa9 changed the title feat: Inspect Permissions feat: Inspect Permissions - 🔴 Blocked by #5408 May 8, 2025
@Zaimwa9
Copy link
Contributor

Zaimwa9 commented May 8, 2025

Created this branch including backend for testing purposes if needed
feat/readonly-user-permissions-5308-with-backend

Copy link
Contributor

@Zaimwa9 Zaimwa9 left a comment

Choose a reason for hiding this comment

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

Couple of comments. Nothing critical (although one in the backend), working really well besides that.

I just have a question. I'm not sure to get what's the difference between GRANTED, GRANTED_FOR_TAGS

@tiagoapolo
Copy link
Contributor Author

tiagoapolo commented May 9, 2025

Couple of comments. Nothing critical (although one in the backend), working really well besides that.

I just have a question. I'm not sure to get what's the difference between GRANTED, GRANTED_FOR_TAGS

GRANTED = Permission was granted for that role
GRANTED_FOR_TAGS = Permission was granted for that role but only when it matches any specified tags.

if a user has a role with GRANTED_FOR_TAGS for DELETE_FEATURE and the role specifies certain tags, they will only be able to delete features that have at least one of those specified tags. Features without any of the specified tags will be protected from deletion by that user.

@tiagoapolo tiagoapolo requested a review from Zaimwa9 May 9, 2025 10:54
}}
/>
)}
{showDerivedPermissions && (
Copy link
Contributor

@Zaimwa9 Zaimwa9 May 12, 2025

Choose a reason for hiding this comment

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

It's more of a product question but I wonder whether we should show that the user has the permission granted both directly and through derived permissions.

Let's say you want to remove create project from me. You would remove it directly from my user permissions without knowing that I will still have it from a role I have but wasn't shown no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We already support that, but we don't show a tooltip text when is a directly assigned permission + derived, but I could add a copy text for that specific case.

Copy link
Contributor

@Zaimwa9 Zaimwa9 left a comment

Choose a reason for hiding this comment

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

Thanks for the changes! Really nice feature, ready to go imo once backend released (and a couple of conflicts to solve)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request 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