Skip to content

Commit f113310

Browse files
committed
fix: expose via dav capabilities whether calendar app is enabled
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
1 parent 9106871 commit f113310

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/dav/lib/Capabilities.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace OCA\DAV;
77

8+
use OCP\App\IAppManager;
89
use OCP\Capabilities\ICapability;
910
use OCP\IConfig;
1011
use OCP\User\IAvailabilityCoordinator;
@@ -13,17 +14,19 @@ class Capabilities implements ICapability {
1314
public function __construct(
1415
private IConfig $config,
1516
private IAvailabilityCoordinator $coordinator,
17+
private IAppManager $appManager,
1618
) {
1719
}
1820

1921
/**
20-
* @return array{dav: array{chunking: string, public_shares_chunking: bool, bulkupload?: string, absence-supported?: bool, absence-replacement?: bool}}
22+
* @return array{dav: array{chunking: string, public_shares_chunking: bool, calendar_enabled: bool, bulkupload?: string, absence-supported?: bool, absence-replacement?: bool}}
2123
*/
2224
public function getCapabilities() {
2325
$capabilities = [
2426
'dav' => [
2527
'chunking' => '1.0',
2628
'public_shares_chunking' => true,
29+
'calendar_enabled' => $this->appManager->isEnabledForUser('calendar'),
2730
]
2831
];
2932
if ($this->config->getSystemValueBool('bulkupload.enabled', true)) {

0 commit comments

Comments
 (0)