diff options
author | Thomas Citharel <tcit@tcit.fr> | 2022-06-10 09:07:53 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2022-06-10 09:07:53 +0200 |
commit | c6c3fd9aa94ad707f6653ff0c646df055a6450f8 (patch) | |
tree | c4d883f0d081fd6015f7b93b417589ae2b57ed5c | |
parent | 8541707f3286e34b8ec24c5399776f61ec8fbb9d (diff) | |
download | nextcloud-server-c6c3fd9aa94ad707f6653ff0c646df055a6450f8.tar.gz nextcloud-server-c6c3fd9aa94ad707f6653ff0c646df055a6450f8.zip |
Avoid creating carddav activities for the system user
Because of the system addressbook synchronisation.
Closes #32803
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
-rw-r--r-- | apps/dav/lib/CardDAV/Activity/Backend.php | 18 |
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(); |