Skip to content

Commit aad7be4

Browse files
committed
Fix Garrett's comments
1 parent 04c5d1d commit aad7be4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

coderd/coderd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ func New(options *Options) *API {
466466
})
467467
r.Route("/entitlements", func(r chi.Router) {
468468
r.Use(apiKeyMiddleware)
469-
r.Get("/", entitlements)
469+
r.Get("/", nopEntitlements)
470470
})
471471
r.HandleFunc("/licenses", unsupported)
472472
})
@@ -523,7 +523,7 @@ func compressHandler(h http.Handler) http.Handler {
523523
return cmp.Handler(h)
524524
}
525525

526-
func entitlements(rw http.ResponseWriter, _ *http.Request) {
526+
func nopEntitlements(rw http.ResponseWriter, _ *http.Request) {
527527
feats := make(map[string]codersdk.Feature)
528528
for _, f := range codersdk.FeatureNames {
529529
feats[f] = codersdk.Feature{

enterprise/coderd/coderd.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ func (api *API) updateEntitlements(ctx context.Context) error {
152152
}
153153
if auditLogs != api.auditLogs {
154154
auditor := agplaudit.NewNop()
155+
// A flag could be added to the options that would allow disabling
156+
// enhanced audit logging here!
155157
if api.auditLogs == codersdk.EntitlementEntitled {
156158
auditor = audit.NewAuditor(
157159
audit.DefaultFilter,

0 commit comments

Comments
 (0)