diff options
author | Simon L <szaimen@e.mail.de> | 2023-04-17 11:46:22 +0200 |
---|---|---|
committer | Simon L <szaimen@e.mail.de> | 2023-04-17 12:51:33 +0200 |
commit | 80645a591a5ed0892179e042001f32de79c4ebba (patch) | |
tree | 980b6239911f74a3a830ad390e26a8bcf314beb3 /apps | |
parent | b21c5c86e5908274e67fc31178e0dff24eed1136 (diff) | |
download | nextcloud-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.php | 6 | ||||
-rw-r--r-- | apps/settings/tests/Controller/CheckSetupControllerTest.php | 4 |
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 |