diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/AppInfo/ConfigLexicon.php | 20 | ||||
-rw-r--r-- | core/Command/Base.php | 2 | ||||
-rw-r--r-- | core/Command/Config/App/GetConfig.php | 12 | ||||
-rw-r--r-- | core/Command/Config/App/SetConfig.php | 5 | ||||
-rw-r--r-- | core/l10n/et_EE.js | 10 | ||||
-rw-r--r-- | core/l10n/et_EE.json | 10 | ||||
-rw-r--r-- | core/openapi-ex_app.json | 8 | ||||
-rw-r--r-- | core/openapi-full.json | 56 | ||||
-rw-r--r-- | core/openapi.json | 56 |
9 files changed, 138 insertions, 41 deletions
diff --git a/core/AppInfo/ConfigLexicon.php b/core/AppInfo/ConfigLexicon.php index 5dad229267d..df8243019ad 100644 --- a/core/AppInfo/ConfigLexicon.php +++ b/core/AppInfo/ConfigLexicon.php @@ -10,6 +10,7 @@ namespace OC\Core\AppInfo; use OCP\Config\Lexicon\Entry; use OCP\Config\Lexicon\ILexicon; +use OCP\Config\Lexicon\Preset; use OCP\Config\Lexicon\Strictness; use OCP\Config\ValueType; @@ -20,6 +21,9 @@ use OCP\Config\ValueType; */ class ConfigLexicon implements ILexicon { public const SHAREAPI_ALLOW_FEDERATION_ON_PUBLIC_SHARES = 'shareapi_allow_federation_on_public_shares'; + public const SHARE_CUSTOM_TOKEN = 'shareapi_allow_custom_tokens'; + public const USER_LANGUAGE = 'lang'; + public const LASTCRON_TIMESTAMP = 'lastcron'; public function getStrictness(): Strictness { return Strictness::IGNORE; @@ -34,10 +38,24 @@ class ConfigLexicon implements ILexicon { definition: 'adds share permission to public shares to allow adding them to your Nextcloud (federation)', lazy: true, ), + new Entry( + key: self::SHARE_CUSTOM_TOKEN, + type: ValueType::BOOL, + defaultRaw: fn (Preset $p): bool => match ($p) { + Preset::FAMILY, Preset::PRIVATE => true, + default => false, + }, + definition: 'Allow users to set custom share link tokens', + lazy: true, + note: 'Shares with guessable tokens may be accessed easily. Shares with custom tokens will continue to be accessible after this setting has been disabled.', + ), + new Entry(self::LASTCRON_TIMESTAMP, ValueType::INT, 0, 'timestamp of last cron execution'), ]; } public function getUserConfigs(): array { - return []; + return [ + new Entry(self::USER_LANGUAGE, ValueType::STRING, null, 'language'), + ]; } } diff --git a/core/Command/Base.php b/core/Command/Base.php index c9b6337b64a..6ab2765b0f9 100644 --- a/core/Command/Base.php +++ b/core/Command/Base.php @@ -170,6 +170,8 @@ class Base extends Command implements CompletionAwareInterface { return 'true'; } elseif ($value === null) { return $returnNull ? null : 'null'; + } if ($value instanceof \UnitEnum) { + return $value->value; } else { return $value; } diff --git a/core/Command/Config/App/GetConfig.php b/core/Command/Config/App/GetConfig.php index b68476a2e91..af0c5648232 100644 --- a/core/Command/Config/App/GetConfig.php +++ b/core/Command/Config/App/GetConfig.php @@ -38,6 +38,12 @@ class GetConfig extends Base { 'returns complete details about the app config value' ) ->addOption( + '--key-details', + null, + InputOption::VALUE_NONE, + 'returns complete details about the app config key' + ) + ->addOption( 'default-value', null, InputOption::VALUE_OPTIONAL, @@ -66,6 +72,12 @@ class GetConfig extends Base { return 0; } + if ($input->getOption('key-details')) { + $details = $this->appConfig->getKeyDetails($appName, $configName); + $this->writeArrayInOutputFormat($input, $output, $details); + return 0; + } + try { $configValue = $this->appConfig->getDetails($appName, $configName)['value']; } catch (AppConfigUnknownKeyException $e) { diff --git a/core/Command/Config/App/SetConfig.php b/core/Command/Config/App/SetConfig.php index 1f4ab81bf05..c818404fc0e 100644 --- a/core/Command/Config/App/SetConfig.php +++ b/core/Command/Config/App/SetConfig.php @@ -199,6 +199,11 @@ class SetConfig extends Base { $current['lazy'] ? 'lazy cache' : 'fast cache' ) ); + $keyDetails = $this->appConfig->getKeyDetails($appName, $configName); + if (($keyDetails['note'] ?? '') !== '') { + $output->writeln('<comment>Note:</comment> ' . $keyDetails['note']); + } + } else { $output->writeln('<info>Config value were not updated</info>'); } diff --git a/core/l10n/et_EE.js b/core/l10n/et_EE.js index bf6db3ec59a..edadb4b18b6 100644 --- a/core/l10n/et_EE.js +++ b/core/l10n/et_EE.js @@ -16,7 +16,7 @@ OC.L10N.register( "Invalid file provided" : "Vigane fail", "No image or file provided" : "Ühtegi pilti või faili pole pakutud", "Unknown filetype" : "Tundmatu failitüüp", - "An error occurred. Please contact your admin." : "Tekkis tõrge. Palun võta ühendust administraatoriga.", + "An error occurred. Please contact your admin." : "Tekkis tõrge. Palun võta ühendust peakasutajaga.", "Invalid image" : "Vigane pilt", "No temporary profile picture available, try again" : "Ühtegi ajutist profiilipilti pole saadaval, proovi uuesti", "No crop data provided" : "Lõikeandmeid ei leitud", @@ -266,11 +266,11 @@ OC.L10N.register( "Account name or email" : "Konto nimi või e-posti aadress", "Account name" : "Kasutajakonto nimi", "Server side authentication failed!" : "Serveripoolne autentimine ebaõnnestus!", - "Please contact your administrator." : "Palun võta ühendust oma administraatoriga.", + "Please contact your administrator." : "Palun võta ühendust oma peakasutajaga.", "Session error" : "Sessiooniviga", "It appears your session token has expired, please refresh the page and try again." : "Tundub, et sinu sessiooni tunnusluba on aegunud, palun laadi leht ja proovi uuesti.", "An internal error occurred." : "Tekkis sisemine viga.", - "Please try again or contact your administrator." : "Palun proovi uuesti või võta ühendust oma administraatoriga.", + "Please try again or contact your administrator." : "Palun proovi uuesti või võta ühendust oma peakasutajaga.", "Password" : "Salasõna", "Log in with a device" : "Logi sisse seadmega", "Login or email" : "Kasutajanimi või e-posti aadress", @@ -431,11 +431,11 @@ OC.L10N.register( "Page not found" : "Lehekülge ei leitud", "The page could not be found on the server or you may not be allowed to view it." : "Seda lehekülge selles serveris ei leidu või sul puudub õigus seda vaadata.", "Too many requests" : "Liiga palju päringuid", - "There were too many requests from your network. Retry later or contact your administrator if this is an error." : "Sinu võrgust tuli liiga palju päringuid. Proovi hiljem uuesti, või võta ühendust administraatoriga, kui tegu on veaga.", + "There were too many requests from your network. Retry later or contact your administrator if this is an error." : "Sinu võrgust tuli liiga palju päringuid. Proovi hiljem uuesti või kui tegu on veaga, siis võta ühendust peakasutajaga.", "Error" : "Viga", "Internal Server Error" : "Serveri sisemine viga", "The server was unable to complete your request." : "Server ei suutnud sinu päringut lõpetada.", - "If this happens again, please send the technical details below to the server administrator." : "Kui see veel kord juhtub, saada tehnilised detailid allpool serveri administraatorile.", + "If this happens again, please send the technical details below to the server administrator." : "Kui see veel kord juhtub, saada tehnilised üksikasjad allpool serveri peakasutajale.", "More details can be found in the server log." : "Lisainfot võib leida serveri logist.", "For more details see the documentation ↗." : "Lisateavet leiad dokumentatsioonist ↗.", "Technical details" : "Tehnilised andmed", diff --git a/core/l10n/et_EE.json b/core/l10n/et_EE.json index 337bd60f905..b596b353654 100644 --- a/core/l10n/et_EE.json +++ b/core/l10n/et_EE.json @@ -14,7 +14,7 @@ "Invalid file provided" : "Vigane fail", "No image or file provided" : "Ühtegi pilti või faili pole pakutud", "Unknown filetype" : "Tundmatu failitüüp", - "An error occurred. Please contact your admin." : "Tekkis tõrge. Palun võta ühendust administraatoriga.", + "An error occurred. Please contact your admin." : "Tekkis tõrge. Palun võta ühendust peakasutajaga.", "Invalid image" : "Vigane pilt", "No temporary profile picture available, try again" : "Ühtegi ajutist profiilipilti pole saadaval, proovi uuesti", "No crop data provided" : "Lõikeandmeid ei leitud", @@ -264,11 +264,11 @@ "Account name or email" : "Konto nimi või e-posti aadress", "Account name" : "Kasutajakonto nimi", "Server side authentication failed!" : "Serveripoolne autentimine ebaõnnestus!", - "Please contact your administrator." : "Palun võta ühendust oma administraatoriga.", + "Please contact your administrator." : "Palun võta ühendust oma peakasutajaga.", "Session error" : "Sessiooniviga", "It appears your session token has expired, please refresh the page and try again." : "Tundub, et sinu sessiooni tunnusluba on aegunud, palun laadi leht ja proovi uuesti.", "An internal error occurred." : "Tekkis sisemine viga.", - "Please try again or contact your administrator." : "Palun proovi uuesti või võta ühendust oma administraatoriga.", + "Please try again or contact your administrator." : "Palun proovi uuesti või võta ühendust oma peakasutajaga.", "Password" : "Salasõna", "Log in with a device" : "Logi sisse seadmega", "Login or email" : "Kasutajanimi või e-posti aadress", @@ -429,11 +429,11 @@ "Page not found" : "Lehekülge ei leitud", "The page could not be found on the server or you may not be allowed to view it." : "Seda lehekülge selles serveris ei leidu või sul puudub õigus seda vaadata.", "Too many requests" : "Liiga palju päringuid", - "There were too many requests from your network. Retry later or contact your administrator if this is an error." : "Sinu võrgust tuli liiga palju päringuid. Proovi hiljem uuesti, või võta ühendust administraatoriga, kui tegu on veaga.", + "There were too many requests from your network. Retry later or contact your administrator if this is an error." : "Sinu võrgust tuli liiga palju päringuid. Proovi hiljem uuesti või kui tegu on veaga, siis võta ühendust peakasutajaga.", "Error" : "Viga", "Internal Server Error" : "Serveri sisemine viga", "The server was unable to complete your request." : "Server ei suutnud sinu päringut lõpetada.", - "If this happens again, please send the technical details below to the server administrator." : "Kui see veel kord juhtub, saada tehnilised detailid allpool serveri administraatorile.", + "If this happens again, please send the technical details below to the server administrator." : "Kui see veel kord juhtub, saada tehnilised üksikasjad allpool serveri peakasutajale.", "More details can be found in the server log." : "Lisainfot võib leida serveri logist.", "For more details see the documentation ↗." : "Lisateavet leiad dokumentatsioonist ↗.", "Technical details" : "Tehnilised andmed", diff --git a/core/openapi-ex_app.json b/core/openapi-ex_app.json index 7f7612a03c9..4dad268c1b3 100644 --- a/core/openapi-ex_app.json +++ b/core/openapi-ex_app.json @@ -181,8 +181,12 @@ "$ref": "#/components/schemas/TaskProcessingIO" }, "output": { - "$ref": "#/components/schemas/TaskProcessingIO", - "nullable": true + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/TaskProcessingIO" + } + ] }, "customId": { "type": "string", diff --git a/core/openapi-full.json b/core/openapi-full.json index 5edb86992dc..d4f69abf535 100644 --- a/core/openapi-full.json +++ b/core/openapi-full.json @@ -675,8 +675,12 @@ "$ref": "#/components/schemas/TaskProcessingIO" }, "output": { - "$ref": "#/components/schemas/TaskProcessingIO", - "nullable": true + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/TaskProcessingIO" + } + ] }, "customId": { "type": "string", @@ -3418,8 +3422,12 @@ "references": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/Reference", - "nullable": true + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + } + ] } } } @@ -3527,8 +3535,12 @@ "references": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/Reference", - "nullable": true + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + } + ] } } } @@ -3609,8 +3621,12 @@ "references": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/Reference", - "nullable": true + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + } + ] } } } @@ -3708,8 +3724,12 @@ "references": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/Reference", - "nullable": true + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + } + ] } } } @@ -3800,8 +3820,12 @@ "references": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/Reference", - "nullable": true + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + } + ] } } } @@ -3905,8 +3929,12 @@ "references": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/Reference", - "nullable": true + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + } + ] } } } diff --git a/core/openapi.json b/core/openapi.json index 5f9178202eb..1a7ddc55c92 100644 --- a/core/openapi.json +++ b/core/openapi.json @@ -675,8 +675,12 @@ "$ref": "#/components/schemas/TaskProcessingIO" }, "output": { - "$ref": "#/components/schemas/TaskProcessingIO", - "nullable": true + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/TaskProcessingIO" + } + ] }, "customId": { "type": "string", @@ -3418,8 +3422,12 @@ "references": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/Reference", - "nullable": true + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + } + ] } } } @@ -3527,8 +3535,12 @@ "references": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/Reference", - "nullable": true + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + } + ] } } } @@ -3609,8 +3621,12 @@ "references": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/Reference", - "nullable": true + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + } + ] } } } @@ -3708,8 +3724,12 @@ "references": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/Reference", - "nullable": true + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + } + ] } } } @@ -3800,8 +3820,12 @@ "references": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/Reference", - "nullable": true + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + } + ] } } } @@ -3905,8 +3929,12 @@ "references": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/Reference", - "nullable": true + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + } + ] } } } |