mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
allow to disable/enable talk-recording
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
07faad0ab2
commit
70f27ae304
12 changed files with 113 additions and 4 deletions
|
|
@ -81,6 +81,10 @@ class ContainerDefinitionFetcher
|
|||
if (!$this->configurationManager->isTalkEnabled()) {
|
||||
continue;
|
||||
}
|
||||
} elseif ($entry['container_name'] === 'nextcloud-aio-talk-recording') {
|
||||
if (!$this->configurationManager->isTalkRecordingEnabled()) {
|
||||
continue;
|
||||
}
|
||||
} elseif ($entry['container_name'] === 'nextcloud-aio-imaginary') {
|
||||
if (!$this->configurationManager->isImaginaryEnabled()) {
|
||||
continue;
|
||||
|
|
@ -179,6 +183,10 @@ class ContainerDefinitionFetcher
|
|||
if (!$this->configurationManager->isTalkEnabled()) {
|
||||
continue;
|
||||
}
|
||||
} elseif ($value === 'nextcloud-aio-talk-recording') {
|
||||
if (!$this->configurationManager->isTalkRecordingEnabled()) {
|
||||
continue;
|
||||
}
|
||||
} elseif ($value === 'nextcloud-aio-imaginary') {
|
||||
if (!$this->configurationManager->isImaginaryEnabled()) {
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -95,6 +95,11 @@ class ConfigurationController
|
|||
} else {
|
||||
$this->configurationManager->SetTalkEnabledState(0);
|
||||
}
|
||||
if (isset($request->getParsedBody()['talk-recording'])) {
|
||||
$this->configurationManager->SetTalkRecordingEnabledState(1);
|
||||
} else {
|
||||
$this->configurationManager->SetTalkRecordingEnabledState(0);
|
||||
}
|
||||
if (isset($request->getParsedBody()['imaginary'])) {
|
||||
$this->configurationManager->SetImaginaryEnabledState(1);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -230,6 +230,27 @@ class ConfigurationManager
|
|||
$this->WriteConfig($config);
|
||||
}
|
||||
|
||||
public function isTalkRecordingEnabled() : bool {
|
||||
if (!$this->isTalkEnabled()) {
|
||||
return false;
|
||||
}
|
||||
$config = $this->GetConfig();
|
||||
if (isset($config['isTalkRecordingEnabled']) && $config['isTalkRecordingEnabled'] === 1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function SetTalkRecordingEnabledState(int $value) : void {
|
||||
if (!$this->isTalkEnabled()) {
|
||||
$value = 0;
|
||||
}
|
||||
$config = $this->GetConfig();
|
||||
$config['isTalkRecordingEnabled'] = $value;
|
||||
$this->WriteConfig($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws InvalidSettingConfigurationException
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -278,6 +278,12 @@ class DockerActionManager
|
|||
} else {
|
||||
$replacements[1] = '';
|
||||
}
|
||||
} elseif ($out[1] === 'TALK_RECORDING_ENABLED') {
|
||||
if ($this->configurationManager->isTalkRecordingEnabled()) {
|
||||
$replacements[1] = 'yes';
|
||||
} else {
|
||||
$replacements[1] = '';
|
||||
}
|
||||
} elseif ($out[1] === 'ONLYOFFICE_ENABLED') {
|
||||
if ($this->configurationManager->isOnlyofficeEnabled()) {
|
||||
$replacements[1] = 'yes';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue