Skip to content

Commit a9f2581

Browse files
committed
remove duplicate dbauthz init
1 parent 2cf1cad commit a9f2581

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

coderd/coderd.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,6 @@ func New(options *Options) *API {
157157
options = &Options{}
158158
}
159159
experiments := initExperiments(options.Logger, options.DeploymentConfig.Experiments.Value, options.DeploymentConfig.Experimental.Value)
160-
// TODO: remove this once we promote authz_querier out of experiments.
161-
if experiments.Enabled(codersdk.ExperimentAuthzQuerier) {
162-
options.Database = dbauthz.New(
163-
options.Database,
164-
options.Authorizer,
165-
options.Logger.Named("authz_query"),
166-
)
167-
}
168160
if options.AppHostname != "" && options.AppHostnameRegex == nil || options.AppHostname == "" && options.AppHostnameRegex != nil {
169161
panic("coderd: both AppHostname and AppHostnameRegex must be set or unset")
170162
}
@@ -207,7 +199,11 @@ func New(options *Options) *API {
207199
}
208200
// TODO: remove this once we promote authz_querier out of experiments.
209201
if experiments.Enabled(codersdk.ExperimentAuthzQuerier) {
210-
options.Database = dbauthz.New(options.Database, options.Authorizer, options.Logger.Named("authz_querier"))
202+
options.Database = dbauthz.New(
203+
options.Database,
204+
options.Authorizer,
205+
options.Logger.Named("authz_querier"),
206+
)
211207
}
212208
if options.SetUserGroups == nil {
213209
options.SetUserGroups = func(context.Context, database.Store, uuid.UUID, []string) error { return nil }

0 commit comments

Comments
 (0)