enh(contacts): show/hide addressbooks for all
- Fixes https://github.com/nextcloud/contacts/issues/479
Summary
TODO
- [ ] ...
Checklist
- Code is properly formatted
- Sign-off message is added to all commits
- [ ] Tests (unit, integration, api and/or acceptance) are included
- [ ] Screenshots before/after for front-end changes
- [ ] Documentation (manuals or wiki) has been updated or is not required
- [ ] Backports requested where applicable (ex: critical bugfixes)
Due to the different implementation of the recently contacted addressbook, the call for changing the enabled property can't be executed, and an "addressbook is immutable" is thrown in apps/contactsinteraction/lib/AddressBook.php::propPatch().
Other addressbooks call apps/dav/lib/CardDAV/AddressBook.php::propPatch()
As far as I can tell the only needed code is the DB update of apps/dav/lib/DAV/CustomPropertiesBackend.php::updateProperties() to have a working enable/disable for the recently contacted addressbook.
Recently contacted address book will be tackled in another issue.
The addressbook is now checked for sharing. If it is shared the props will be saved as userProps. So even if the addressbook is renamed by user that is not the owner (not possible in the contacts app yet), the owners addressbook name isn't changed. For the case the addressbook has a userProp name, this name is shown now.
nitpick: enh(contacts) should be feat(contacts) according to https://www.conventionalcommits.org/en/v1.0.0/
/backport to stable27