Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2cc56ab

Browse files
authored
chore: fill out workspace owner data for dynamic parameters (#17366)
1 parentea65ddc commit2cc56ab

File tree

17 files changed

+635
-345
lines changed

17 files changed

+635
-345
lines changed

‎coderd/apidoc/docs.go

Lines changed: 37 additions & 29 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json

Lines changed: 35 additions & 27 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/coderd.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,10 +1108,6 @@ func New(options *Options) *API {
11081108
// The idea is to return an empty [], so that the coder CLI won't get blocked accidentally.
11091109
r.Get("/schema",templateVersionSchemaDeprecated)
11101110
r.Get("/parameters",templateVersionParametersDeprecated)
1111-
r.Group(func(r chi.Router) {
1112-
r.Use(httpmw.RequireExperiment(api.Experiments,codersdk.ExperimentDynamicParameters))
1113-
r.Get("/dynamic-parameters",api.templateVersionDynamicParameters)
1114-
})
11151111
r.Get("/rich-parameters",api.templateVersionRichParameters)
11161112
r.Get("/external-auth",api.templateVersionExternalAuth)
11171113
r.Get("/variables",api.templateVersionVariables)
@@ -1177,6 +1173,17 @@ func New(options *Options) *API {
11771173
// organization member. This endpoint should match the authz story of
11781174
// postWorkspacesByOrganization
11791175
r.Post("/workspaces",api.postUserWorkspaces)
1176+
1177+
// Similarly to creating a workspace, evaluating parameters for a
1178+
// new workspace should also match the authz story of
1179+
// postWorkspacesByOrganization
1180+
r.Route("/templateversions/{templateversion}",func(r chi.Router) {
1181+
r.Use(
1182+
httpmw.ExtractTemplateVersionParam(options.Database),
1183+
httpmw.RequireExperiment(api.Experiments,codersdk.ExperimentDynamicParameters),
1184+
)
1185+
r.Get("/parameters",api.templateVersionDynamicParameters)
1186+
})
11801187
})
11811188

11821189
r.Group(func(r chi.Router) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp