Skip to content

DNM: example PR to show how to add a new RBAC resource #14055

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

Closed
wants to merge 20 commits into from

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Jul 30, 2024

  1. In coderd/rbac/policy/policy.go, add your resources and action definitions.
  2. Run make gen to generate codersdk/rbacresources_gen.go
  3. Update roles in coderd/rbac/roles.go and ensure tests in coderd/rbac pass
  4. Add database tables & authorization
  5. Add API routes & authorization
  6. Add tests

This comment was marked as outdated.

@johnstcn johnstcn marked this pull request as draft July 30, 2024 10:04
@dannykopping dannykopping force-pushed the cj/howto-add-rbac-frobulation branch 2 times, most recently from e24c3fb to ac6f3fd Compare July 31, 2024 11:54
Signed-off-by: Danny Kopping <danny@coder.com>
@dannykopping dannykopping force-pushed the cj/howto-add-rbac-frobulation branch from ac6f3fd to 7e86229 Compare July 31, 2024 12:22
Signed-off-by: Danny Kopping <danny@coder.com>
@github-actions github-actions bot added the stale This issue is like stale bread. label Aug 9, 2024
@github-actions github-actions bot closed this Aug 12, 2024
…dd-rbac-frobulation

Signed-off-by: Danny Kopping <danny@coder.com>
@dannykopping dannykopping reopened this Aug 19, 2024
@dannykopping dannykopping removed the stale This issue is like stale bread. label Aug 19, 2024
@github-actions github-actions bot added the stale This issue is like stale bread. label Aug 27, 2024
@github-actions github-actions bot closed this Aug 31, 2024
@dannykopping dannykopping reopened this Sep 3, 2024
@github-actions github-actions bot removed the stale This issue is like stale bread. label Sep 4, 2024
Signed-off-by: Danny Kopping <danny@coder.com>
@dannykopping dannykopping force-pushed the cj/howto-add-rbac-frobulation branch from af5ddb1 to cf9df67 Compare September 5, 2024 12:05
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
johnstcn and others added 2 commits September 9, 2024 08:23
Co-authored-by: Steven Masley <Emyrk@users.noreply.github.com>
@johnstcn johnstcn requested a review from Emyrk September 9, 2024 08:28
Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

👍

All LG! Do not actually merge though!

@johnstcn
Copy link
Member Author

Thanks @Emyrk @dannykopping ! Closing this out.

@johnstcn johnstcn closed this Sep 10, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 10, 2024
@github-actions github-actions bot deleted the cj/howto-add-rbac-frobulation branch March 11, 2025 00:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants