Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions coderd/coderd.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,7 @@ func New(options *Options) *API {
DeploymentID: api.DeploymentID,
WebPushPublicKey: api.WebpushDispatcher.PublicKey(),
Telemetry: api.Telemetry.Enabled(),
HideVersion: api.DeploymentValues.HideLoginVersion.Value(),
}
api.SiteHandler = site.New(&site.Options{
BinFS: binFS,
Expand Down
14 changes: 14 additions & 0 deletions codersdk/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ type DeploymentValues struct {
Notifications NotificationsConfig `json:"notifications,omitempty" typescript:",notnull"`
AdditionalCSPPolicy serpent.StringArray `json:"additional_csp_policy,omitempty" typescript:",notnull"`
WorkspaceHostnameSuffix serpent.String `json:"workspace_hostname_suffix,omitempty" typescript:",notnull"`
HideLoginVersion serpent.Bool `json:"hide_login_version,omitempty" typescript:",notnull"`

Config serpent.YAMLConfigPath `json:"config,omitempty" typescript:",notnull"`
WriteConfig serpent.Bool `json:"write_config,omitempty" typescript:",notnull"`
Expand Down Expand Up @@ -2720,6 +2721,16 @@ Write out the current server config as YAML to stdout.`,
Value: &c.AllowWorkspaceRenames,
YAML: "allowWorkspaceRenames",
},
{
Name: "Hide Version on Login Page",
Description: "If enabled, the Coder version will not be displayed on the login page.",
Flag: "hide-login-version",
Env: "CODER_HIDE_LOGIN_VERSION",
Default: "false",
Value: &c.HideLoginVersion,
Group: &deploymentGroupClient,
YAML: "hideLoginVersion",
},
// Healthcheck Options
{
Name: "Health Check Refresh",
Expand Down Expand Up @@ -3212,6 +3223,9 @@ type BuildInfoResponse struct {

// WebPushPublicKey is the public key for push notifications via Web Push.
WebPushPublicKey string `json:"webpush_public_key,omitempty"`

// HideVersion is a boolean that indicates whether the version should be hidden on the login page.
HideVersion bool `json:"hide_version"`
}

type WorkspaceProxyBuildInfo struct {
Expand Down
1 change: 1 addition & 0 deletions site/src/api/typesGenerated.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion site/src/pages/LoginPage/LoginPageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const LoginPageView: FC<LoginPageViewProps> = ({
<div>
Copyright &copy; {new Date().getFullYear()} Coder Technologies, Inc.
</div>
<div>{buildInfo?.version}</div>
{!buildInfo?.hide_version && <div>{buildInfo?.version}</div>}
{tosAccepted && (
<TermsOfServiceLink
url={authMethods?.terms_of_service_url}
Expand Down
Loading