@@ -20,12 +20,12 @@ import (
20
20
// roles. Ideally only included in the enterprise package, but the routes are
21
21
// intermixed with AGPL endpoints.
22
22
type CustomRoleHandler interface {
23
- PatchOrganizationRole (ctx context.Context , rw http. ResponseWriter , r * http.Request , orgID uuid.UUID , role codersdk.Role ) (codersdk.Role , bool )
23
+ PatchOrganizationRole (ctx context.Context , db database. Store , rw http.ResponseWriter , orgID uuid.UUID , role codersdk.Role ) (codersdk.Role , bool )
24
24
}
25
25
26
26
type agplCustomRoleHandler struct {}
27
27
28
- func (agplCustomRoleHandler ) PatchOrganizationRole (ctx context.Context , rw http. ResponseWriter , _ * http.Request , _ uuid.UUID , _ codersdk.Role ) (codersdk.Role , bool ) {
28
+ func (agplCustomRoleHandler ) PatchOrganizationRole (ctx context.Context , _ database. Store , rw http.ResponseWriter , _ uuid.UUID , _ codersdk.Role ) (codersdk.Role , bool ) {
29
29
httpapi .Write (ctx , rw , http .StatusForbidden , codersdk.Response {
30
30
Message : "Creating and updating custom roles is an Enterprise feature. Contact sales!" ,
31
31
})
@@ -54,7 +54,7 @@ func (api *API) patchOrgRoles(rw http.ResponseWriter, r *http.Request) {
54
54
return
55
55
}
56
56
57
- updated , ok := handler .PatchOrganizationRole (ctx , rw , r , organization .ID , req )
57
+ updated , ok := handler .PatchOrganizationRole (ctx , api . Database , rw , organization .ID , req )
58
58
if ! ok {
59
59
return
60
60
}
0 commit comments