Completely remove "edition" from capabilities

This removes the "edition" value for the capabilities. We don't need that
anymore.
This commit is contained in:
Ralf Haferkamp
2025-03-19 15:34:38 +01:00
parent 492dee61e8
commit 0c2da6e8fd
11 changed files with 1 additions and 52 deletions
-1
View File
@@ -34,7 +34,6 @@ type Config struct {
EnableFederatedSharingIncoming bool `yaml:"enable_federated_sharing_incoming" env:"OC_ENABLE_OCM;FRONTEND_ENABLE_FEDERATED_SHARING_INCOMING" desc:"Changing this value is NOT supported. Enables support for incoming federated sharing for clients. The backend behaviour is not changed." introductionVersion:"1.0.0"` EnableFederatedSharingIncoming bool `yaml:"enable_federated_sharing_incoming" env:"OC_ENABLE_OCM;FRONTEND_ENABLE_FEDERATED_SHARING_INCOMING" desc:"Changing this value is NOT supported. Enables support for incoming federated sharing for clients. The backend behaviour is not changed." introductionVersion:"1.0.0"`
EnableFederatedSharingOutgoing bool `yaml:"enable_federated_sharing_outgoing" env:"OC_ENABLE_OCM;FRONTEND_ENABLE_FEDERATED_SHARING_OUTGOING" desc:"Changing this value is NOT supported. Enables support for outgoing federated sharing for clients. The backend behaviour is not changed." introductionVersion:"1.0.0"` EnableFederatedSharingOutgoing bool `yaml:"enable_federated_sharing_outgoing" env:"OC_ENABLE_OCM;FRONTEND_ENABLE_FEDERATED_SHARING_OUTGOING" desc:"Changing this value is NOT supported. Enables support for outgoing federated sharing for clients. The backend behaviour is not changed." introductionVersion:"1.0.0"`
SearchMinLength int `yaml:"search_min_length" env:"FRONTEND_SEARCH_MIN_LENGTH" desc:"Minimum number of characters to enter before a client should start a search for Share receivers. This setting can be used to customize the user experience if e.g too many results are displayed." introductionVersion:"1.0.0"` SearchMinLength int `yaml:"search_min_length" env:"FRONTEND_SEARCH_MIN_LENGTH" desc:"Minimum number of characters to enter before a client should start a search for Share receivers. This setting can be used to customize the user experience if e.g too many results are displayed." introductionVersion:"1.0.0"`
Edition string `yaml:"edition" env:"OC_EDITION;FRONTEND_EDITION" desc:"Edition of OpenCloud. Used for branding purposes." introductionVersion:"1.0.0"`
DisableSSE bool `yaml:"disable_sse" env:"OC_DISABLE_SSE;FRONTEND_DISABLE_SSE" desc:"When set to true, clients are informed that the Server-Sent Events endpoint is not accessible." introductionVersion:"1.0.0"` DisableSSE bool `yaml:"disable_sse" env:"OC_DISABLE_SSE;FRONTEND_DISABLE_SSE" desc:"When set to true, clients are informed that the Server-Sent Events endpoint is not accessible." introductionVersion:"1.0.0"`
DefaultLinkPermissions int `yaml:"default_link_permissions" env:"FRONTEND_DEFAULT_LINK_PERMISSIONS" desc:"Defines the default permissions a link is being created with. Possible values are 0 (= internal link, for instance members only) and 1 (= public link with viewer permissions). Defaults to 1." introductionVersion:"1.0.0"` DefaultLinkPermissions int `yaml:"default_link_permissions" env:"FRONTEND_DEFAULT_LINK_PERMISSIONS" desc:"Defines the default permissions a link is being created with. Possible values are 0 (= internal link, for instance members only) and 1 (= public link with viewer permissions). Defaults to 1." introductionVersion:"1.0.0"`
@@ -87,7 +87,6 @@ func DefaultConfig() *config.Config {
DefaultUploadProtocol: "tus", DefaultUploadProtocol: "tus",
DefaultLinkPermissions: 1, DefaultLinkPermissions: 1,
SearchMinLength: 3, SearchMinLength: 3,
Edition: "",
Checksums: config.Checksums{ Checksums: config.Checksums{
SupportedTypes: []string{"sha1", "md5", "adler32"}, SupportedTypes: []string{"sha1", "md5", "adler32"},
PreferredUploadType: "sha1", PreferredUploadType: "sha1",
@@ -208,7 +208,6 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
"needsDbUpgrade": false, "needsDbUpgrade": false,
"version": version.Legacy, "version": version.Legacy,
"versionstring": version.LegacyString, "versionstring": version.LegacyString,
"edition": cfg.Edition,
"productname": "OpenCloud", "productname": "OpenCloud",
"product": "OpenCloud", "product": "OpenCloud",
"productversion": version.GetString(), "productversion": version.GetString(),
-1
View File
@@ -77,7 +77,6 @@ func Server(cfg *config.Config) *cli.Command {
ocdav.Product(cfg.Status.Product), ocdav.Product(cfg.Status.Product),
ocdav.Version(cfg.Status.Version), ocdav.Version(cfg.Status.Version),
ocdav.VersionString(cfg.Status.VersionString), ocdav.VersionString(cfg.Status.VersionString),
ocdav.Edition(cfg.Status.Edition),
ocdav.MachineAuthAPIKey(cfg.MachineAuthAPIKey), ocdav.MachineAuthAPIKey(cfg.MachineAuthAPIKey),
ocdav.Broker(broker.NoOp{}), ocdav.Broker(broker.NoOp{}),
// ocdav.FavoriteManager() // FIXME needs a proper persistence implementation https://github.com/owncloud/ocis/issues/1228 // ocdav.FavoriteManager() // FIXME needs a proper persistence implementation https://github.com/owncloud/ocis/issues/1228
-1
View File
@@ -81,5 +81,4 @@ type Status struct {
Product string Product string
ProductName string ProductName string
ProductVersion string ProductVersion string
Edition string `yaml:"edition" env:"OC_EDITION;OCDAV_EDITION" desc:"Edition of OpenCloud. Used for branding purposes." introductionVersion:"1.0.0"`
} }
@@ -92,7 +92,6 @@ func DefaultConfig() *config.Config {
ProductVersion: version.GetString(), ProductVersion: version.GetString(),
Product: "OpenCloud", Product: "OpenCloud",
ProductName: "OpenCloud", ProductName: "OpenCloud",
Edition: "",
}, },
} }
} }
@@ -214,17 +214,6 @@ class CapabilitiesContext implements Context {
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response); $this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response);
$responseXmlObject = HttpRequestHelper::getResponseXml($response, __METHOD__)->data->capabilities; $responseXmlObject = HttpRequestHelper::getResponseXml($response, __METHOD__)->data->capabilities;
$edition = $this->getParameterValueFromXml(
$responseXmlObject,
'core',
'status@@@edition'
);
if (!\strlen($edition)) {
Assert::fail(
"Cannot get edition from core capabilities"
);
}
$product = $this->getParameterValueFromXml( $product = $this->getParameterValueFromXml(
$responseXmlObject, $responseXmlObject,
@@ -249,7 +238,6 @@ class CapabilitiesContext implements Context {
); );
} }
$jsonExpectedDecoded['edition'] = $edition;
$jsonExpectedDecoded['product'] = $product; $jsonExpectedDecoded['product'] = $product;
$jsonExpectedDecoded['productname'] = $productName; $jsonExpectedDecoded['productname'] = $productName;
@@ -2042,17 +2042,6 @@ class FeatureContext extends BehatVariablesContext {
); );
} }
/**
* @return string
*/
public function getEditionFromStatus(): string {
$decodedResponse = $this->getJsonDecodedStatusPhp();
if (isset($decodedResponse['edition'])) {
return $decodedResponse['edition'];
}
return '';
}
/** /**
* @return string|null * @return string|null
*/ */
@@ -2282,14 +2271,6 @@ class FeatureContext extends BehatVariablesContext {
], ],
"parameter" => [] "parameter" => []
], ],
[
"code" => "%edition%",
"function" => [
$this,
"getEditionFromStatus"
],
"parameter" => []
],
[ [
"code" => "%version%", "code" => "%version%",
"function" => [ "function" => [
@@ -193,17 +193,12 @@ Feature: capabilities
"status": { "status": {
"type": "object", "type": "object",
"required": [ "required": [
"edition",
"product", "product",
"productname", "productname",
"version", "version",
"versionstring" "versionstring"
], ],
"properties": { "properties": {
"edition": {
"type": "string",
"enum": ["%edition%"]
},
"product": { "product": {
"type": "string", "type": "string",
"enum": ["%productname%"] "enum": ["%productname%"]
@@ -230,7 +225,6 @@ Feature: capabilities
"type": "object", "type": "object",
"required": [ "required": [
"string", "string",
"edition",
"product" "product"
], ],
"properties": { "properties": {
@@ -238,10 +232,6 @@ Feature: capabilities
"type": "string", "type": "string",
"enum": ["%versionstring%"] "enum": ["%versionstring%"]
}, },
"edition": {
"type": "string",
"enum": ["%edition%"]
},
"product": { "product": {
"type": "string", "type": "string",
"enum": ["%productname%"] "enum": ["%productname%"]
@@ -47,7 +47,6 @@ Feature: default capabilities for normal user
"required": [ "required": [
"version", "version",
"versionstring", "versionstring",
"edition",
"productname" "productname"
], ],
"properties": { "properties": {
@@ -57,9 +56,6 @@ Feature: default capabilities for normal user
"versionstring": { "versionstring": {
"const": "%versionstring%" "const": "%versionstring%"
}, },
"edition": {
"const": "%edition%"
},
"productname": { "productname": {
"const": "%productname%" "const": "%productname%"
} }
@@ -8,5 +8,5 @@ Feature: Status
When the administrator requests status.php When the administrator requests status.php
Then the status.php response should include Then the status.php response should include
""" """
{"installed":true,"maintenance":false,"needsDbUpgrade":false,"version":"$CURRENT_VERSION","versionstring":"$CURRENT_VERSION_STRING","edition":"$EDITION","productname":"$PRODUCTNAME","product":"$PRODUCT"} {"installed":true,"maintenance":false,"needsDbUpgrade":false,"version":"$CURRENT_VERSION","versionstring":"$CURRENT_VERSION_STRING","productname":"$PRODUCTNAME","product":"$PRODUCT"}
""" """