Skip to content

Commit 7989533

Browse files
authored
Merge pull request #5456 from LibreSign/backport/5454/stable31
[stable31] chore: add link to logs
2 parents 2bd7ce7 + 34b8668 commit 7989533

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

lib/Service/Install/ConfigureCheckService.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
use OCA\Libresign\Handler\SignEngine\JSignPdfHandler;
1616
use OCA\Libresign\Helper\ConfigureCheckHelper;
1717
use OCA\Libresign\Helper\JavaHelper;
18+
use OCP\App\IAppManager;
1819
use OCP\IAppConfig;
20+
use OCP\IURLGenerator;
1921
use Psr\Log\LoggerInterface;
2022

2123
class ConfigureCheckService {
@@ -26,6 +28,8 @@ public function __construct(
2628
private IAppConfig $appConfig,
2729
private SystemConfig $systemConfig,
2830
private AppConfig $ocAppConfig,
31+
protected IAppManager $appManager,
32+
protected IURLGenerator $urlGenerator,
2933
private JSignPdfHandler $jSignPdfHandler,
3034
private CertificateEngineFactory $certificateEngineFactory,
3135
private SignSetupService $signSetupService,
@@ -351,9 +355,17 @@ private function getErrorAndTipToResultOfVerify(array $result, string $resource)
351355
}
352356
}
353357
$this->logger->error('Invalid hash of binaries files', ['result' => $result]);
358+
if ($this->appManager->isEnabledForUser('logreader')) {
359+
return [
360+
'Invalid hash of binaries files.',
361+
'Check your nextcloud.log file on '
362+
. $this->urlGenerator->linkToRouteAbsolute('settings.adminsettings.form', ['section' => 'logging'])
363+
. ' and run occ libresign:install --all',
364+
];
365+
}
354366
return [
355367
'Invalid hash of binaries files.',
356-
'Check your nextcloud.log file an run occ libresign:install --all',
368+
'Check your nextcloud.log file and run occ libresign:install --all',
357369
];
358370
}
359371

0 commit comments

Comments
 (0)