8000 feat: implement organization role sync by Emyrk · Pull Request #14649 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: implement organization role sync #14649

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 13 commits into from
Sep 17, 2024
Prev Previous commit
Next Next commit
linting
  • Loading branch information
Emyrk committed Sep 16, 2024
commit 7ff0bb0d455c003f2c2a0e6cd749d16373b134d7
4 changes: 2 additions & 2 deletions coderd/members.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func (api *API) putMemberRoles(rw http.ResponseWriter, r *http.Request) {
defer commitAudit()

// Check if changing roles is allowed
if !api.allowChangingMemberRoles(rw, ctx, member, organization) {
if !api.allowChangingMemberRoles(ctx, rw, member, organization) {
return
}

Expand Down Expand Up @@ -265,7 +265,7 @@ func (api *API) putMemberRoles(rw http.ResponseWriter, r *http.Request) {
httpapi.Write(ctx, rw, http.StatusOK, resp[0])
}

func (api *API) allowChangingMemberRoles(rw http.ResponseWriter, ctx context.Context, member httpmw.OrganizationMember, organization database.Organization) bool {
func (api *API) allowChangingMemberRoles(ctx context.Context, rw http.ResponseWriter, member httpmw.OrganizationMember, organization database.Organization) bool {
// nolint:gocritic // The caller could be an org admin without this perm.
// We need to disable manual role assignment if role sync is enabled for
// the given organization.
Expand Down
Loading
0