Skip to content
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

feat: upgrade AdminAlert to PermissionGuard #4074

Merged
merged 5 commits into from
Jun 23, 2023
Merged

Conversation

nunogois
Copy link
Member

@nunogois nunogois commented Jun 22, 2023

https://linear.app/unleash/issue/2-1165/improve-adminalert-usage-to-be-more-generic-accept-non-admin

Upgrades our AdminAlert to a new PermissionGuard.

Question: We don't need to, but should we be specific about the ADMIN permission every time?
Technically PermissionGuard could have permissions as optional and assume [] by default, which will add ADMIN anyways. However, I feel like we may gain some readability if we're specific about it. WDYT?

Single permission:
image

Multiple permissions:
image

@vercel
Copy link

vercel bot commented Jun 22, 2023

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

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2023 10:06am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Jun 23, 2023 10:06am

Copy link
Contributor

@gastonfournier gastonfournier left a comment

Choose a reason for hiding this comment

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

I think this helps to explain to the user what type of permission they need, but I'm not sure this is what we want to do. Most services don't provide many details about which permissions you're missing. I think it's a good feature but I'd validate it with others

Copy link
Contributor

@chriswk chriswk left a comment

Choose a reason for hiding this comment

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

I concur with Gaston here. I really like this feature, it might even help people request the correct access from their manager / admin.

Ping @thomasheartman - What do you think?

@nunogois nunogois merged commit 95a0c77 into main Jun 23, 2023
17 checks passed
@nunogois nunogois deleted the feat-permission-guard branch June 23, 2023 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants