Skip to content

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

Closed
johnstcn wants to merge 20 commits into
mainfrom
cj/howto-add-rbac-frobulation
Closed

DNM: example PR to show how to add a new RBAC resource#14055
johnstcn wants to merge 20 commits into
mainfrom
cj/howto-add-rbac-frobulation

Conversation

@johnstcn
Copy link
Copy Markdown
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

@alwaysmeticulous

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>
Comment thread coderd/database/dbauthz/dbauthz.go Outdated
@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>
Comment thread coderd/coderd.go
Comment thread coderd/frobulators.go
Comment thread coderd/frobulators.go
Comment thread coderd/database/dbauthz/dbauthz.go Outdated
Comment thread coderd/database/dbauthz/dbauthz_test.go Outdated
Comment thread coderd/database/dbgen/dbgen.go Outdated
Comment thread coderd/database/queries/frobulators.sql Outdated
Comment thread coderd/rbac/roles_test.go
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
Copy Markdown
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
Copy Markdown
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