Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2022-06-10 10:07:53 +0300
committerThomas Citharel <tcit@tcit.fr>2022-06-10 10:07:53 +0300
commitc6c3fd9aa94ad707f6653ff0c646df055a6450f8 (patch)
treec4d883f0d081fd6015f7b93b417589ae2b57ed5c /apps
parent8541707f3286e34b8ec24c5399776f61ec8fbb9d (diff)
Avoid creating carddav activities for the system user
Because of the system addressbook synchronisation. Closes #32803 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/CardDAV/Activity/Backend.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/apps/dav/lib/CardDAV/Activity/Backend.php b/apps/dav/lib/CardDAV/Activity/Backend.php
index b713284e182..184b3f0cb10 100644
--- a/apps/dav/lib/CardDAV/Activity/Backend.php
+++ b/apps/dav/lib/CardDAV/Activity/Backend.php
@@ -103,7 +103,14 @@ class Backend {
return;
}
- $principal = explode('/', $addressbookData['principaluri']);
+ $principalUri = $addressbookData['principaluri'];
+
+ // We are not interested in changes from the system addressbook
+ if ($principalUri === 'principals/system/system') {
+ return;
+ }
+
+ $principal = explode('/', $principalUri);
$owner = array_pop($principal);
$currentUser = $this->userSession->getUser();
@@ -393,7 +400,14 @@ class Backend {
return;
}
- $principal = explode('/', $addressbookData['principaluri']);
+ $principalUri = $addressbookData['principaluri'];
+
+ // We are not interested in changes from the system addressbook
+ if ($principalUri === 'principals/system/system') {
+ return;
+ }
+
+ $principal = explode('/', $principalUri);
$owner = array_pop($principal);
$currentUser = $this->userSession->getUser();