Skip to content

Commit eb38c0d

Browse files
committed
remove panic
1 parent bf653b6 commit eb38c0d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

coderd/coderd.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,13 @@ func New(options *Options) *API {
159159
experiments := initExperiments(options.Logger, options.DeploymentConfig.Experiments.Value, options.DeploymentConfig.Experimental.Value)
160160
// TODO: remove this once we promote authz_querier out of experiments.
161161
if experiments.Enabled(codersdk.ExperimentAuthzQuerier) {
162-
panic("Coming soon!")
163-
// if _, ok := (options.Database).(*authzquery.AuthzQuerier); !ok {
164-
// options.Database = authzquery.NewAuthzQuerier(options.Database, options.Authorizer)
165-
// }
162+
if _, ok := (options.Database).(*authzquery.AuthzQuerier); !ok {
163+
options.Database = authzquery.New(
164+
options.Database,
165+
options.Authorizer,
166+
options.Logger.Named("authz_query"),
167+
)
168+
}
166169
}
167170
if options.AppHostname != "" && options.AppHostnameRegex == nil || options.AppHostname == "" && options.AppHostnameRegex != nil {
168171
panic("coderd: both AppHostname and AppHostnameRegex must be set or unset")

0 commit comments

Comments
 (0)