Skip to content

Address book / CardDAV federation: User account deletion not considered  #46220

Open
@kesselb

Description

Steps to reproduce

  1. Set up CardDAV federation for Nextcloud A and Nextcloud B
  2. A&B: Run dav:sync-system-addressbook and federation:sync-addressbooks
  3. Check via contacts or thunderbird that we have a copy of the remote address book
  4. B: Add a new user bob
  5. A&B: Run dav:sync-system-addressbook and federation:sync-addressbooks
  6. A: Check that bob from B is there
  7. B: Delete bob
  8. A&B: Run dav:sync-system-addressbook and federation:sync-addressbooks
  9. A: Bob's still there

$changed = $this->carddavBackend->getChangesForAddressBook(
$this->addressBookInfo['id'],
$syncToken,
$syncLevel,
$limit
);
if (empty($changed)) {
return $changed;
}
$added = $modified = $deleted = [];
foreach ($changed['added'] as $uri) {
try {
$this->getChild($uri);
$added[] = $uri;
} catch (NotFound | Forbidden $e) {
$deleted[] = $uri;
}
}
foreach ($changed['modified'] as $uri) {
try {
$this->getChild($uri);
$modified[] = $uri;
} catch (NotFound | Forbidden $e) {
$deleted[] = $uri;
}
}
$changed['added'] = $added;
$changed['modified'] = $modified;
$changed['deleted'] = $deleted;
return $changed;

  • getChangesForAddressBook does include the deleted user
  • The deleted element is not processed

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions