-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(dav): store scopes for properties and filter locally scoped properties for federated address book sync #38048
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 code looks very good
Only one remark. Existing users with local properties don't get a trigger to update their vcards, right? Only when a user property changes we regenerate the system card |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with my database user. Set all props to local and now I suddenly have an entry in the system addres book. All props are scoped to v2-local 👍
Didn't test federation
Yes that is indeed an issue, everything that already exists and doesn't update is gonna stay the same. Maybe a repair step could help? |
|
98e22d2
to
5b85828
Compare
Is this generally ready to review? |
At this point there's hopefully a way to factorize things in |
To be sure the filtered sync changes work as expected I'd like to throw DAVxc5 and Thunderbird against the federated address book using system:sharedsecret. That should work, right? |
If you know the shared secret that should work, yes. |
I'm struggling to connect to the collection with the
Edit: had the wrong URL
|
drone fails because of merge conflict |
} | ||
|
||
if (!$this->carddavBackend instanceof SyncSupport) { | ||
return null; |
Check failure
Code scanning / Psalm
NullableReturnStatement
throw new UnsupportedLimitOnInitialSyncException(); | ||
} | ||
|
||
if (!$this->carddavBackend instanceof SyncSupport) { |
Check notice
Code scanning / Psalm
DocblockTypeContradiction
5adc674
to
92ddc95
Compare
Unintentionally tested the sharing enumeration restriction. Works 👍 Without it, I finally get my system contacts:
My user's location is only shown in the downloaded .vcf if set to federated or published. If set to local it's not readable for the remote instance 👍 |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I let davx5 play federated instance and sync the addressbook. Works on master, then switched to this branch, rebuilt the SAB and synced again. No local props show up on the phone 👍
f0303d3
to
6bf009b
Compare
Fixed the static analysis issue with nullable changes. Even tried to fix upstream but the usual suspect was faster: sabre-io/dav@9b10ec6 |
/** | ||
* @throws UnsupportedLimitOnInitialSyncException | ||
*/ | ||
public function getChanges($syncToken, $syncLevel, $limit = null) { |
Check failure
Code scanning / Psalm
InvalidNullableReturnType
…erties for federated address book sync Signed-off-by: Anna Larch <anna@nextcloud.com>
9f30e1f
to
bd80a1b
Compare
contacts menu integration test fails reliably -> merge |
Summary
Adds a users property scopes to the system address book. Private properties are not written at all.
When syncing with a federated share, the locally scoped properties should not be shared with the remote host.
Todo
How to test
Needs a federated instance setup
Before
After
Checklist