Remove duplicated ReadOnlyConfig setup check

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2023-10-26 14:35:09 +02:00
parent dec52f6979
commit 506f3961ec
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A
4 changed files with 0 additions and 42 deletions

View file

@ -564,10 +564,6 @@ Raw output
return str_contains($this->config->getSystemValue('dbtype'), 'sqlite');
}
protected function isReadOnlyConfig(): bool {
return \OC_Helper::isReadOnlyConfigEnabled();
}
protected function wasEmailTestSuccessful(): bool {
// Handle the case that the configuration was set before the check was introduced or it was only set via command line and not from the UI
if ($this->config->getAppValue('core', 'emailTestSuccessful', '') === '' && $this->config->getSystemValue('mail_domain', '') === '') {
@ -817,7 +813,6 @@ Raw output
public function check() {
return new DataResponse(
[
'isReadOnlyConfig' => $this->isReadOnlyConfig(),
'hasValidTransactionIsolationLevel' => $this->hasValidTransactionIsolationLevel(),
'wasEmailTestSuccessful' => $this->wasEmailTestSuccessful(),
'hasFileinfoInstalled' => $this->hasFileinfoInstalled(),

View file

@ -189,7 +189,6 @@ class CheckSetupControllerTest extends TestCase {
$this->setupCheckManager,
])
->setMethods([
'isReadOnlyConfig',
'wasEmailTestSuccessful',
'hasValidTransactionIsolationLevel',
'hasFileinfoInstalled',
@ -379,10 +378,6 @@ class CheckSetupControllerTest extends TestCase {
$this->checkSetupController
->method('isSqliteUsed')
->willReturn(false);
$this->checkSetupController
->expects($this->once())
->method('isReadOnlyConfig')
->willReturn(false);
$this->checkSetupController
->expects($this->once())
->method('wasEmailTestSuccessful')
@ -494,7 +489,6 @@ class CheckSetupControllerTest extends TestCase {
$expected = new DataResponse(
[
'isReadOnlyConfig' => false,
'wasEmailTestSuccessful' => false,
'hasValidTransactionIsolationLevel' => true,
'hasFileinfoInstalled' => true,

View file

@ -180,12 +180,6 @@
var afterCall = function(data, statusText, xhr) {
var messages = [];
if (xhr.status === 200 && data) {
if (data.isReadOnlyConfig) {
messages.push({
msg: t('core', 'The read-only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update.'),
type: OC.SetupChecks.MESSAGE_TYPE_INFO
});
}
if (!data.wasEmailTestSuccessful) {
messages.push({
msg: t('core', 'You have not set or verified your email server configuration, yet. Please head over to the {mailSettingsStart}Basic settings{mailSettingsEnd} in order to set them. Afterwards, use the "Send email" button below the form to verify your settings.',)

View file

@ -224,7 +224,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -293,7 +292,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -362,7 +360,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -427,7 +424,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -491,7 +487,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -555,7 +550,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: false,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -619,7 +613,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: false,
hasDBFileLocking: false,
@ -683,7 +676,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: true,
@ -747,7 +739,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -813,7 +804,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -877,7 +867,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -943,7 +932,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -1007,7 +995,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -1091,7 +1078,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -1162,7 +1148,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -1226,7 +1211,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -1290,7 +1274,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -1358,7 +1341,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -1423,7 +1405,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -1485,7 +1466,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -1550,7 +1530,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -1615,7 +1594,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -1679,7 +1657,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -1743,7 +1720,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,
@ -1814,7 +1790,6 @@ describe('OC.SetupChecks tests', function() {
},
JSON.stringify({
hasFileinfoInstalled: true,
isReadOnlyConfig: false,
wasEmailTestSuccessful: true,
hasWorkingFileLocking: true,
hasDBFileLocking: false,