Skip to content

Document RBAC support #373

Closed
Closed
@jmacdotorg

Description

@jmacdotorg
Contributor

CodeRabbit is rolling out support for RBAC soon. Let's get it documented!

Activity

self-assigned this
on Jun 2, 2025
linear

linear commented on Jun 2, 2025

@linear
added theissue type on Jun 2, 2025
traycerai

traycerai commented on Jun 2, 2025

@traycerai

Plan

Observations

All assumptions have been clarified. RBAC is a brand-new feature—no existing code, schema or docs exist. We know the Docusaurus structure, MDX tooling, and asset conventions.

Approach

Create new schema, viewer component, guide and reference pages, asset folders, and sidebar updates. Use existing patterns (YamlEditor, JSONSchemaViewer) for interactivity.

Reasoning

I reviewed the docs directory organization, MDX components, asset conventions, and confirmed RBAC is a new feature requiring end-to-end documentation, schema and integration into sidebars.

Proposed File Changes

📄 static/schema/rbac.schema.json (NEW) 🔗

References

Add a new JSON Schema for RBAC following Draft-07 conventions. Define a root object with roles, permissions, and assignments properties. Under definitions, declare role, permission, and assignment objects with required fields. This schema will drive both documentation and YAML validation.

📄 src/components/RBACSchemaViewer.tsx (NEW) 🔗

References

Add a new React component that imports rbac.schema.json and renders it via JSONSchemaViewer. Copy license header format from SchemaViewer.tsx. Ensure the import path uses @site/static/schema/rbac.schema.json and pass the schema to <JSONSchemaViewer schema={...} />.

📄 docs/guides/rbac-support.md (NEW) 🔗

References

Create the main RBAC guide in docs/guides/rbac-support.md. Add front-matter with title: "Role-Based Access Control (RBAC)" and a brief description. Import YamlEditor and the new RBACSchemaViewer as MDX components. Structure sections: Introduction, Built-in Roles & Permissions, UI-Based Role Management (screenshots placeholders), YAML-Based Role Configuration (embed <YamlEditor /> using the new schema), Best Practices, Troubleshooting & FAQs. Use standard MDX syntax and refer to images at /img/guides/rbac-*.png.

📄 docs/reference/rbac-schema.md (NEW) 🔗

References

Create a reference page in docs/reference/rbac-schema.md. Front-matter title: "RBAC Configuration Schema". Import the RBACSchemaViewer component. Embed it to display the full schema, then annotate each top-level property (roles, permissions, assignments) and definitions. Provide short YAML examples showing valid role and assignment entries.

📄 sidebars.ts (MODIFY) 🔗

In the docsSidebar config, under the “Configure CodeRabbit” category, insert 'guides/rbac-support' immediately after 'getting-started/configure-coderabbit'. Under the “Reference” category, insert 'reference/rbac-schema' after existing reference entries. Maintain array order and formatting consistent with surrounding items.

📄 docs/faq.md (MODIFY) 🔗

Locate the “Access & Permissions” or similar section and add a Q/A: Q: “How do I set up roles & permissions in CodeRabbit?” A: “We now support RBAC — see Role-Based Access Control guide for details.” Follow existing FAQ style.

📄 docs/overview/introduction.md (MODIFY) 🔗

Optionally update the “What’s new” or features list to include a bullet: “RBAC: Define custom roles and granular permissions across repos and teams — see RBAC guide.” Keep tone consistent and list order logical.

Import In IDE

VSCode Icon Cursor Icon Windsurf Icon

Developer Humor

🐇🔒 With roles and perms now in sight,
CodeRabbit’s docs will shine so bright.
From schema to guide,
Our pages will ride,
Giving every user just-right might!


Execution Information

Branch: main
Commit: 96dc292


💡 Tips

Supported Commands (Inside Comments)

  • Use @traycerai generate to iterate on the previous version of the implementation plan.

Supported Commands (Inside Description)

  • Add @traycerai ignore anywhere in the ticket description to prevent this ticket from being processed.
  • Add @traycerai branch:<branch-name> anywhere in the ticket description to specify the target branch for the implementation plan.

Community

  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @jmacdotorg

    Issue actions

      Document RBAC support · Issue #373 · coderabbitai/coderabbit-docs