Read and write a contact's note for the connection's owner (core #896) #30
Labels
No labels
bug
documentation
enhancement
performance
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo-dav#30
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Core #896 (landed as
a01c4a3ab) made a contact's note each person's own:Contact.notesis no longer a column but a value read for somebody, and reading it without saying whose raisespostulo.jobs.models.NotReadFor.The sync reads and writes it directly:
src/postulo_dav/sync.py:143—note=contact.noteswhen writing a card;src/postulo_dav/sync.py:151—contact.notes = card.notewhen reading one;src/postulo_dav/sync.py:476— appending tocontact.notes.What to do instead, per the plugin guide's new section:
contact.note_for(connection.owner)(or the queryset'swith_notes(owner)), and write withcontact.write_note(connection.owner, text);Contact.objects.visible_to(owner)and change them only withinvisible_to(owner, write=True)— a contact may now be a group's, or shared read-only;notes=still works, as its owner's own.Repin to
a01c4a3abor later and runpostulo.plugins.testingagainst it.Fixed by pull request #35, merged as
fb8bbd7ae.