diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-11-15 15:03:48 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-11-15 15:53:38 +0100 |
commit | 45541eb685c4f3a5742508afcc02d07e46e64b5f (patch) | |
tree | 48b853c62eba367e95f5c0d8b50697d1a2e5fa9c /apps/dav | |
parent | ce6e3a3a01ee33fb010382cb33f527dcb8989544 (diff) | |
download | nextcloud-server-45541eb685c4f3a5742508afcc02d07e46e64b5f.tar.gz nextcloud-server-45541eb685c4f3a5742508afcc02d07e46e64b5f.zip |
feat(dav): Enable OOO UI and expose enabled via OCP
Makes the feature opt-out now that we have meaningful integrations based
on OOO data. Allows instances still to turn the feature off.
For apps like Mail that build on top of this feature we need to know if
the instance has the feature turned on or off. This is exposed as OCP
API, too.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Settings/AvailabilitySettings.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/dav/lib/Settings/AvailabilitySettings.php b/apps/dav/lib/Settings/AvailabilitySettings.php index e2f2fe7cef6..c48ebe0255e 100644 --- a/apps/dav/lib/Settings/AvailabilitySettings.php +++ b/apps/dav/lib/Settings/AvailabilitySettings.php @@ -33,6 +33,7 @@ use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Services\IInitialState; use OCP\IConfig; use OCP\Settings\ISettings; +use OCP\User\IAvailabilityCoordinator; use Psr\Log\LoggerInterface; class AvailabilitySettings implements ISettings { @@ -44,6 +45,7 @@ class AvailabilitySettings implements ISettings { IInitialState $initialState, ?string $userId, private LoggerInterface $logger, + private IAvailabilityCoordinator $coordinator, private AbsenceMapper $absenceMapper) { $this->config = $config; $this->initialState = $initialState; @@ -60,11 +62,7 @@ class AvailabilitySettings implements ISettings { 'no' ) ); - $hideAbsenceSettings = $this->config->getAppValue( - Application::APP_ID, - 'hide_absence_settings', - 'yes', - ) === 'yes'; + $hideAbsenceSettings = !$this->coordinator->isEnabled(); $this->initialState->provideInitialState('hide_absence_settings', $hideAbsenceSettings); if (!$hideAbsenceSettings) { try { |