fix version for legacy clients

This commit is contained in:
Michael Barz
2022-05-16 13:43:21 +02:00
parent cd87caede9
commit a8b6c53dd9
7 changed files with 32 additions and 12 deletions

View File

@@ -0,0 +1,6 @@
Bugfix: Fix version number in status page
We needed to undo the version number changes on the status page to keep compatibility for legacy clients. We added a new field `productversion` for the actual version of the product.
https://github.com/owncloud/ocis/issues/3788
https://github.com/owncloud/ocis/pull/3805

View File

@@ -139,11 +139,12 @@ func FrontendConfigFromStruct(cfg *config.Config) map[string]interface{} {
"installed": true,
"maintenance": false,
"needsDbUpgrade": false,
"version": version.Long(),
"versionstring": version.GetString(),
"version": version.Legacy,
"versionstring": version.LegacyString,
"edition": "Community",
"productname": "Infinite Scale",
"product": "Infinite Scale",
"productversion": version.GetString(),
"hostname": "",
},
"support_url_signing": true,

View File

@@ -58,6 +58,7 @@ func Server(cfg *config.Config) *cli.Command {
ocdav.GatewaySvc(cfg.Reva.Address),
ocdav.JWTSecret(cfg.TokenManager.JWTSecret),
ocdav.ProductName(cfg.Status.ProductName),
ocdav.ProductVersion(cfg.Status.ProductVersion),
ocdav.Product(cfg.Status.Product),
ocdav.Version(cfg.Status.Version),
ocdav.VersionString(cfg.Status.VersionString),

View File

@@ -79,9 +79,10 @@ type Auth struct {
// Status holds the configurable values for the status.php
type Status struct {
Version string
VersionString string
Product string
ProductName string
Edition string
Version string
VersionString string
Product string
ProductName string
ProductVersion string
Edition string
}

View File

@@ -44,11 +44,12 @@ func DefaultConfig() *config.Config {
},
},
Status: config.Status{
Version: version.Long(),
VersionString: version.GetString(),
Product: "Infinite Scale",
ProductName: "Infinite Scale",
Edition: "Community",
Version: version.Legacy,
VersionString: version.LegacyString,
ProductVersion: version.GetString(),
Product: "Infinite Scale",
ProductName: "Infinite Scale",
Edition: "Community",
},
}
}

View File

@@ -128,6 +128,10 @@ func DefaultPolicies() []config.Policy {
Endpoint: "/webdav/",
Service: "com.owncloud.web.ocdav",
},
{
Endpoint: "/status",
Service: "com.owncloud.web.ocdav",
},
{
Endpoint: "/status.php",
Service: "com.owncloud.web.ocdav",

View File

@@ -13,6 +13,12 @@ var (
// Date indicates the build date.
Date = time.Now().Format("20060102")
// Legacy defines the old long 4 number ownCloud version needed for some clients
Legacy = "10.11.0.0"
// LegacyString defines the old ownCloud version needed for some clients
LegacyString = "10.11.0"
)
// Compiled returns the compile time of this service.