-
Notifications
You must be signed in to change notification settings - Fork 23
feat: permission form tags #2635
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
Conversation
Add Role tab as fourth option in permission form subject controls alongside Team, Person, and Notification. Role selection maps to subject field with subject_type set to "group" and supports admin, editor, viewer, responder, and commander roles.
Add playbook as a new subject type option in PermissionSubjectControls: - Import FormikPlaybooksDropdown component - Add "Playbook" to switch options and type union - Handle playbook selection in state initialization and effects - Set subject_type to "playbook" when playbook is selected - Store selected playbook ID in subject field
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for goofy-euclid-75956c ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for clerk-saas-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the permissions system by adding tags support, expanding subject types to include roles and playbooks, and improving the refresh functionality. The changes enable more granular permission control through tags and broader subject coverage.
- Add tags support for permissions with key-value mapping
- Expand subject types to include roles and playbooks
- Replace query client refresh with ref-based refetch mechanism
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/pages/Settings/PermissionsPage.tsx | Switch from useQueryClient to ref-based refetch pattern |
src/components/Permissions/PermissionsView.tsx | Add onRefetch prop and playbook:* action option |
src/components/Permissions/PermissionsTable.tsx | Refactor RLS badge rendering from subject column to resource column with individual tag/agent badges |
src/components/Permissions/ManagePermissions/Forms/PermissionSubjectControls.tsx | Add Role and Playbook subject types with new dropdown components |
src/components/Permissions/ManagePermissions/Forms/PermissionForm.tsx | Add tags field with FormikKeyValueMapField |
src/components/Forms/Formik/FormikRoleDropdown.tsx | New dropdown component for role selection |
src/api/types/permissions.ts | Update type definitions with new subject types and tags field |
src/api/services/users.ts | Filter out system users and deleted users from person queries |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
✅ Deploy Preview for flanksource-demo-stable ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Remove RLS payload (tags/agents) from Subject column - Add individual badges for each tag and agent in Resource column - Display tags as "key: value" badges in blue - Display agents as "agent: name" badges in gray - Use inline layout for compact display alongside resource info
2327939
to
cd80d0e
Compare
|
* Move subject to the top
- Action dropdown now hidden until resource is selected - Playbook resources show playbook-specific actions (run, approve, *) - Other resources (catalog, component, connection, canary, global) show common actions only
… and playbooks Unifies resource selection by using FormikResourceSelectorDropdown for both connection and playbook resources instead of their dedicated components, providing consistent filtering and search functionality across all resource types.
7c480cb
to
800b094
Compare
resolves: #2634