summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2023-04-17 11:46:22 +0200
committerSimon L <szaimen@e.mail.de>2023-04-17 12:51:33 +0200
commit80645a591a5ed0892179e042001f32de79c4ebba (patch)
tree980b6239911f74a3a830ad390e26a8bcf314beb3 /apps
parentb21c5c86e5908274e67fc31178e0dff24eed1136 (diff)
downloadnextcloud-server-80645a591a5ed0892179e042001f32de79c4ebba.tar.gz
nextcloud-server-80645a591a5ed0892179e042001f32de79c4ebba.zip
add an admin check for db file locking
Signed-off-by: Simon L <szaimen@e.mail.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/settings/lib/Controller/CheckSetupController.php6
-rw-r--r--apps/settings/tests/Controller/CheckSetupControllerTest.php4
2 files changed, 10 insertions, 0 deletions
diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php
index 81a112cac55..cdf660bde86 100644
--- a/apps/settings/lib/Controller/CheckSetupController.php
+++ b/apps/settings/lib/Controller/CheckSetupController.php
@@ -59,6 +59,7 @@ use OC\DB\MissingPrimaryKeyInformation;
use OC\DB\SchemaWrapper;
use OC\IntegrityCheck\Checker;
use OC\Lock\NoopLockingProvider;
+use OC\Lock\DBLockingProvider;
use OC\MemoryInfo;
use OCA\Settings\SetupChecks\CheckUserCertificates;
use OCA\Settings\SetupChecks\LdapInvalidUuids;
@@ -619,6 +620,10 @@ Raw output
return !($this->lockingProvider instanceof NoopLockingProvider);
}
+ protected function hasDBFileLocking(): bool {
+ return ($this->lockingProvider instanceof DBLockingProvider);
+ }
+
protected function getSuggestedOverwriteCliURL(): string {
$currentOverwriteCliUrl = $this->config->getSystemValue('overwrite.cli.url', '');
$suggestedOverwriteCliUrl = $this->request->getServerProtocol() . '://' . $this->request->getInsecureServerHost() . \OC::$WEBROOT;
@@ -875,6 +880,7 @@ Raw output
'wasEmailTestSuccessful' => $this->wasEmailTestSuccessful(),
'hasFileinfoInstalled' => $this->hasFileinfoInstalled(),
'hasWorkingFileLocking' => $this->hasWorkingFileLocking(),
+ 'hasDBFileLocking' => $this->hasDBFileLocking(),
'suggestedOverwriteCliURL' => $this->getSuggestedOverwriteCliURL(),
'cronInfo' => $this->getLastCronInfo(),
'cronErrors' => $this->getCronErrors(),
diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php
index 81aa7af0b21..2678d5ce9ee 100644
--- a/apps/settings/tests/Controller/CheckSetupControllerTest.php
+++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php
@@ -504,6 +504,10 @@ class CheckSetupControllerTest extends TestCase {
->willReturn(true);
$this->checkSetupController
->expects($this->once())
+ ->method('hasDBileLocking')
+ ->willReturn(true);
+ $this->checkSetupController
+ ->expects($this->once())
->method('getSuggestedOverwriteCliURL')
->willReturn('');
$this->checkSetupController