summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/DAV/Sharing/Backend.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/DAV/Sharing/Backend.php')
-rw-r--r--apps/dav/lib/DAV/Sharing/Backend.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/dav/lib/DAV/Sharing/Backend.php b/apps/dav/lib/DAV/Sharing/Backend.php
index 87c094c6d62..433d9db9c08 100644
--- a/apps/dav/lib/DAV/Sharing/Backend.php
+++ b/apps/dav/lib/DAV/Sharing/Backend.php
@@ -67,12 +67,18 @@ class Backend {
* @param string[] $add
* @param string[] $remove
*/
- public function updateShares($shareable, $add, $remove) {
+ public function updateShares(IShareable $shareable, array $add, array $remove) {
foreach($add as $element) {
- $this->shareWith($shareable, $element);
+ $principal = $this->principalBackend->findByUri($element['href'], '');
+ if ($principal !== '') {
+ $this->shareWith($shareable, $element);
+ }
}
foreach($remove as $element) {
- $this->unshare($shareable, $element);
+ $principal = $this->principalBackend->findByUri($element, '');
+ if ($principal !== '') {
+ $this->unshare($shareable, $element);
+ }
}
}