Skip to content

feat: Add rbac to templateversion+orgmember endpoints #1713

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

Merged
merged 10 commits into from
May 25, 2022

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented May 24, 2022

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
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 kylecarbs, spikecurtis and johnstcn and removed request for kylecarbs May 25, 2022 13:37
@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