feat: Adds toggle for root key permissions#2062
Conversation
|
|
@harshsbhat is attempting to deploy a commit to the Unkey Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughWalkthroughThe changes enhance the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Client
participant PermissionToggle
User->>Client: Toggle "Select All Permissions"
Client->>PermissionToggle: Check all permissions
PermissionToggle-->>Client: Update individual permissions state
Client-->>User: Reflect updated permissions
Assessment against linked issues
Possibly related PRs
Tip New featuresWalkthrough comment now includes:
Notes:
Warning Review ran into problemsProblems (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Thank you for following the naming conventions for pull request titles! 🙏 |
|
I don't know why the video is blinking like that. It's not an issue in the code. Mostly seems like an issue with loom. |
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- apps/dashboard/app/(app)/settings/root-keys/new/client.tsx (2 hunks)
Additional comments not posted (4)
apps/dashboard/app/(app)/settings/root-keys/new/client.tsx (4)
94-121: LGTM!The new
PermissionTogglecomponent for selecting all workspace permissions is correctly implemented and enhances the user experience.
124-152: LGTM!The new
PermissionTogglecomponent for selecting all permissions under each workspace permission category is correctly implemented and provides a more granular control over permissions.
181-208: LGTM!The new
PermissionTogglecomponent for selecting all API permissions is correctly implemented and enhances the user experience.
209-253: LGTM!The new
PermissionTogglecomponent for selecting all permissions under each API permission category is correctly implemented and provides a more granular control over permissions.
Hmm. It does look pretty dense. So what should we do then? Close this for now? I didn't get what you meant by |
|
can you also check the encrypted meta feature whenever your free? |
…arshbhat/toggle-rootKey
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- apps/dashboard/app/(app)/settings/root-keys/new/client.tsx (4 hunks)
Files skipped from review as they are similar to previous changes (1)
- apps/dashboard/app/(app)/settings/root-keys/new/client.tsx
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Refactored parts looks good to me 🚀 |
perkinsjr
left a comment
There was a problem hiding this comment.
Currently the implementation doesn't give explict context to this toggle.
Because of the way the layout is right now it's hard to tell if this is a mistake that someone added a checkbox to a title or an action.
Some small tweaks that we can do before we overhaul this entirely.
- Make the top level action bold for example API
- Add the descriptor on the right that states "Enable all permissions for X"
Once those changes are made I will approve it.
Done! |
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- apps/dashboard/app/(app)/settings/root-keys/new/client.tsx (5 hunks)
Additional comments not posted (6)
apps/dashboard/app/(app)/settings/root-keys/new/client.tsx (6)
94-100: LGTM!The code changes are approved.
106-114: LGTM!The code changes are approved.
148-151: LGTM!The code changes are approved.
156-166: LGTM!The code changes are approved.
254-254: LGTM!The code changes are approved.
266-266: LGTM!The code changes are approved.






What does this PR do?
Fixes #1960
It creates a select all toggles for all the APIs as well as workspace permissions while creating the rootkey.
https://www.loom.com/share/13dd6733a9e44a089f082791dfc616d6?sid=9c9f5506-be92-4137-8d7f-af248236024a
Type of change
How should this be tested?
Create a new root key with the permissions you desire to select. It should have toggles that say select all.
Checklist
Required
pnpm buildpnpm fmtconsole.logsgit pull origin mainAppreciated
Summary by CodeRabbit