Skip to content

feat: Add rbac to templateversion+orgmember endpoints#1713

Merged
Emyrk merged 10 commits into
mainfrom
stevenmasley/rbac_template_versions
May 25, 2022
Merged

feat: Add rbac to templateversion+orgmember endpoints#1713
Emyrk merged 10 commits into
mainfrom
stevenmasley/rbac_template_versions

Conversation

@Emyrk

@Emyrk Emyrk commented May 24, 2022

Copy link
Copy Markdown
Member

RBAC on {templateversions} endpoints and assign org roles endpoint.

@Emyrk Emyrk changed the title feat: Add rbac to templateversion endpoints feat: Add rbac to templateversion+orgmember endpoints May 24, 2022
@Emyrk Emyrk marked this pull request as ready for review May 24, 2022 16:46
Comment on lines +65 to +67
// ExtractOrganizationMemberParam grabs a user membership from the "organization" and "user" URL parameter.
// This middleware requires the ExtractUser and ExtractOrganization middleware higher in the stack
func ExtractOrganizationMemberParam(db database.Store) func(http.Handler) http.Handler {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Before ExtractOrganization did this with the APIKey.UserID. That didn't make sense to me, as we use {user} for ExtractUser.

So I changed this to use the user from {user} and org from {organization}

@Emyrk Emyrk requested review from johnstcn, kylecarbs and spikecurtis and removed request for kylecarbs May 25, 2022 13:37
Comment thread coderd/rbac/builtin.go
Comment thread coderd/workspaceresources.go
@Emyrk Emyrk merged commit eea8dc6 into main May 25, 2022
@Emyrk Emyrk deleted the stevenmasley/rbac_template_versions branch May 25, 2022 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants