feat: Add office switcher with feature comparison (#7421)
Some checks failed
Codespell / Check spelling (push) Waiting to run
Docker Lint / docker-lint (push) Waiting to run
Lint php / php-lint (push) Waiting to run
Lint php / php-lint-summary (push) Blocked by required conditions
PHP Deprecation Detector / PHP Deprecation Detector (push) Waiting to run
Playwright Tests on push / test (push) Waiting to run
Static analysis / static-psalm-analysis (push) Waiting to run
Twig Lint / twig-lint (push) Has been cancelled

Signed-off-by: Julius Knorr <jus@bitgrid.net>
Signed-off-by: Simon L. <szaimen@e.mail.de>
Signed-off-by: Andrew Backhouse <andrew.backhouse@nextcloud.com>
Co-authored-by: Simon L. <szaimen@e.mail.de>
Co-authored-by: Andrew Backhouse <andrew.backhouse@nextcloud.com>
This commit is contained in:
Julius Knorr 2026-01-28 09:53:53 +01:00 committed by GitHub
parent 8939104d10
commit 3f4eecaa96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 338 additions and 59 deletions

View file

@ -76,24 +76,24 @@ readonly class ConfigurationController {
}
if (isset($request->getParsedBody()['options-form'])) {
if (isset($request->getParsedBody()['collabora']) && isset($request->getParsedBody()['onlyoffice'])) {
throw new InvalidSettingConfigurationException("Collabora and Onlyoffice are not allowed to be enabled at the same time!");
$officeSuiteChoice = $request->getParsedBody()['office_suite_choice'] ?? '';
if ($officeSuiteChoice === 'collabora') {
$this->configurationManager->SetCollaboraEnabledState(1);
$this->configurationManager->SetOnlyofficeEnabledState(0);
} elseif ($officeSuiteChoice === 'onlyoffice') {
$this->configurationManager->SetCollaboraEnabledState(0);
$this->configurationManager->SetOnlyofficeEnabledState(1);
} else {
$this->configurationManager->SetCollaboraEnabledState(0);
$this->configurationManager->SetOnlyofficeEnabledState(0);
}
if (isset($request->getParsedBody()['clamav'])) {
$this->configurationManager->SetClamavEnabledState(1);
} else {
$this->configurationManager->SetClamavEnabledState(0);
}
if (isset($request->getParsedBody()['onlyoffice'])) {
$this->configurationManager->SetOnlyofficeEnabledState(1);
} else {
$this->configurationManager->SetOnlyofficeEnabledState(0);
}
if (isset($request->getParsedBody()['collabora'])) {
$this->configurationManager->SetCollaboraEnabledState(1);
} else {
$this->configurationManager->SetCollaboraEnabledState(0);
}
if (isset($request->getParsedBody()['talk'])) {
$this->configurationManager->SetTalkEnabledState(1);
} else {