Skip to content

Commit d59ecbe

Browse files
committed
fixem
1 parent 3d16842 commit d59ecbe

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

coderd/coderd.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,9 @@ func New(options *Options) *API {
314314

315315
if options.Authorizer == nil {
316316
options.Authorizer = rbac.NewCachingAuthorizer(options.PrometheusRegistry)
317-
}
318-
if buildinfo.IsDev() {
319-
options.Authorizer = rbac.Recorder(options.Authorizer)
317+
if buildinfo.IsDev() {
318+
options.Authorizer = rbac.Recorder(options.Authorizer)
319+
}
320320
}
321321

322322
if options.AccessControlStore == nil {

enterprise/coderd/coderd.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ func New(ctx context.Context, options *Options) (_ *API, err error) {
7171
}
7272
if options.Options.Authorizer == nil {
7373
options.Options.Authorizer = rbac.NewCachingAuthorizer(options.PrometheusRegistry)
74+
if buildinfo.IsDev() {
75+
options.Authorizer = rbac.Recorder(options.Authorizer)
76+
}
7477
}
7578
if options.ReplicaErrorGracePeriod == 0 {
7679
// This will prevent the error from being shown for a minute

0 commit comments

Comments
 (0)