summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/CalDAV')
-rw-r--r--apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php12
-rw-r--r--apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php2
-rw-r--r--apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php2
3 files changed, 12 insertions, 4 deletions
diff --git a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php
index dcd393b512e..d658c3433f2 100644
--- a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php
+++ b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php
@@ -50,6 +50,9 @@ abstract class AbstractPrincipalBackend implements BackendInterface {
/** @var string */
private $dbTableName;
+ /** @var string */
+ private $cuType;
+
/**
* @param IDBConnection $dbConnection
* @param IUserSession $userSession
@@ -57,18 +60,22 @@ abstract class AbstractPrincipalBackend implements BackendInterface {
* @param ILogger $logger
* @param string $principalPrefix
* @param string $dbPrefix
+ * @param string $cuType
*/
public function __construct(IDBConnection $dbConnection,
IUserSession $userSession,
IGroupManager $groupManager,
ILogger $logger,
- $principalPrefix, $dbPrefix) {
+ string $principalPrefix,
+ string $dbPrefix,
+ string $cuType) {
$this->db = $dbConnection;
$this->userSession = $userSession;
$this->groupManager = $groupManager;
$this->logger = $logger;
$this->principalPrefix = $principalPrefix;
$this->dbTableName = 'calendar_' . $dbPrefix;
+ $this->cuType = $cuType;
}
/**
@@ -328,7 +335,8 @@ abstract class AbstractPrincipalBackend implements BackendInterface {
return [
'uri' => $this->principalPrefix . '/' . $row['backend_id'] . '-' . $row['resource_id'],
'{DAV:}displayname' => $row['displayname'],
- '{http://sabredav.org/ns}email-address' => $row['email']
+ '{http://sabredav.org/ns}email-address' => $row['email'],
+ '{urn:ietf:params:xml:ns:caldav}calendar-user-type' => $this->cuType,
];
}
diff --git a/apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php
index a1030376c11..f8f10e78f94 100644
--- a/apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php
+++ b/apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php
@@ -40,6 +40,6 @@ class ResourcePrincipalBackend extends AbstractPrincipalBackend {
IGroupManager $groupManager,
ILogger $logger) {
parent::__construct($dbConnection, $userSession, $groupManager, $logger,
- 'principals/calendar-resources', 'resources');
+ 'principals/calendar-resources', 'resources', 'RESOURCE');
}
}
diff --git a/apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php
index 1d22299515f..3059ed80ea6 100644
--- a/apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php
+++ b/apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php
@@ -40,6 +40,6 @@ class RoomPrincipalBackend extends AbstractPrincipalBackend {
IGroupManager $groupManager,
ILogger $logger) {
parent::__construct($dbConnection, $userSession, $groupManager, $logger,
- 'principals/calendar-rooms', 'rooms');
+ 'principals/calendar-rooms', 'rooms', 'ROOM');
}
}