Skip to content

Commit 4116ad8

Browse files
committed
cleanup and make gen
1 parent f91ffe5 commit 4116ad8

File tree

7 files changed

+128
-150
lines changed

7 files changed

+128
-150
lines changed

coderd/apidoc/docs.go

+26-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

+22-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/coderd.go

+3
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ func New(options *Options) *API {
424424
TemplateScheduleStore: options.TemplateScheduleStore,
425425
UserQuietHoursScheduleStore: options.UserQuietHoursScheduleStore,
426426
AccessControlStore: options.AccessControlStore,
427+
CustomRoleHandler: atomic.Pointer[CustomRoleHandler]{},
427428
Experiments: experiments,
428429
healthCheckGroup: &singleflight.Group[string, *healthsdk.HealthcheckReport]{},
429430
Acquirer: provisionerdserver.NewAcquirer(
@@ -436,6 +437,8 @@ func New(options *Options) *API {
436437
workspaceUsageTracker: options.WorkspaceUsageTracker,
437438
}
438439

440+
var customRoleHandler CustomRoleHandler = &agplCustomRoleHandler{}
441+
api.CustomRoleHandler.Store(&customRoleHandler)
439442
api.AppearanceFetcher.Store(&appearance.DefaultFetcher)
440443
api.PortSharer.Store(&portsharing.DefaultPortSharer)
441444
buildInfo := codersdk.BuildInfoResponse{

coderd/database/dbauthz/dbauthz.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ func (q *querier) canAssignRoles(ctx context.Context, orgID *uuid.UUID, added, r
615615
}
616616

617617
if roleOrgID != *orgID {
618-
return xerrors.Errorf("attempted to assign role from a different org, role %q to %q", r, (*orgID).String())
618+
return xerrors.Errorf("attempted to assign role from a different org, role %q to %q", r, orgID.String())
619619
}
620620
}
621621

coderd/roles.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type CustomRoleHandler interface {
2626

2727
type agplCustomRoleHandler struct{}
2828

29-
func (agplCustomRoleHandler) PatchOrganizationRole(ctx context.Context, db database.Store, rw http.ResponseWriter, orgID uuid.UUID, role codersdk.Role) (codersdk.Role, bool) {
29+
func (agplCustomRoleHandler) PatchOrganizationRole(ctx context.Context, _ database.Store, rw http.ResponseWriter, _ uuid.UUID, _ codersdk.Role) (codersdk.Role, bool) {
3030
httpapi.Write(ctx, rw, http.StatusForbidden, codersdk.Response{
3131
Message: "Creating and updating custom roles is an Enterprise feature. Contact sales!",
3232
})

docs/api/members.md

+75-75
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)