feat: rbac keys - Merge after RBAC Permissions#3319
feat: rbac keys - Merge after RBAC Permissions#3319ogzhanolguncu wants to merge 48 commits intomainfrom
Conversation
refactor: role and permission logic fix: already assigned badge feat: add better tracking for role
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis change refactors the dashboard’s authorization roles and permissions management by removing legacy RBAC UI components and server-rendered pages, and introducing a new client-side architecture. It adds comprehensive, modular React components, hooks, and schemas for managing roles, permissions, and key assignments, along with new TRPC procedures for querying, upserting, and deleting these entities, plus LLM-powered search and filtering. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI
participant TRPC
participant DB
participant LLM
User->>UI: Open Permissions or Roles Page
UI->>TRPC: queryPermissions/queryRoles (with filters, pagination)
TRPC->>DB: Fetch permissions/roles, apply filters, join associations
DB-->>TRPC: Return paginated results
TRPC-->>UI: Return permissions/roles data
UI-->>User: Render virtualized table with controls
User->>UI: Search or filter (via LLM or controls)
UI->>TRPC: permissionsLlmSearch/rolesLlmSearch (with query)
TRPC->>LLM: getStructuredSearchFromLLM(query)
LLM-->>TRPC: Return structured filters
TRPC-->>UI: Return filter objects
UI->>TRPC: queryPermissions/queryRoles (with new filters)
TRPC->>DB: Fetch filtered data
DB-->>TRPC: Return results
TRPC-->>UI: Return data
UI-->>User: Update table
User->>UI: Edit/Create/Delete Permission/Role
UI->>TRPC: upsertPermission/upsertRole/deletePermissionWithRelations/deleteRoleWithRelations
TRPC->>DB: Insert/Update/Delete records, handle relations, log audit
DB-->>TRPC: Confirm operation
TRPC-->>UI: Return success/error
UI-->>User: Show toast, update UI
Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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! 🙏 |
What does this PR do?
This PR allows you to change RBAC config of key in keys list and keys details pages.
Fixes # (issue)
If there is not an issue for this, please create one first. This is used to tracking purposes and also helps use understand why this PR exists
Type of change
How should this be tested?
Granted Accessis rendering correct, deduplicated slugsChecklist
Required
pnpm buildpnpm fmtconsole.logsgit pull origin mainAppreciated
Summary by CodeRabbit
New Features
Improvements
Bug Fixes
Removals
Documentation