Add app config to toggle the default calendar setting as an admin

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2022-01-12 13:43:50 +01:00
committed by backportbot-nextcloud[bot]
parent 1d16341d0f
commit 33f24e5add

View File

@@ -96,7 +96,8 @@ class ConfigService {
return false;
}
$defaultState = (bool)$this->config->getUserValue($this->getUserId(), Application::APP_ID, 'calendar', true);
$appConfigState = $this->config->getAppValue(Application::APP_ID, 'calendar', 'yes') === 'yes';
$defaultState = (bool)$this->config->getUserValue($this->getUserId(), Application::APP_ID, 'calendar', $appConfigState);
if ($boardId === null) {
return $defaultState;
}