-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(OCM-invites): Implementation of invitation flow for OCM 1.1.0 #51113
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
Conversation
nickvergessen
left a comment
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.
Where is this table written?
I only see a single SELECT and an UPDATE, but no INSERT?
apps/cloud_federation_api/lib/Controller/RequestHandlerController.php
Outdated
Show resolved
Hide resolved
apps/cloud_federation_api/lib/Controller/RequestHandlerController.php
Outdated
Show resolved
Hide resolved
apps/cloud_federation_api/lib/Controller/RequestHandlerController.php
Outdated
Show resolved
Hide resolved
apps/cloud_federation_api/lib/Controller/RequestHandlerController.php
Outdated
Show resolved
Hide resolved
apps/cloud_federation_api/lib/Migration/Version1015Date202502262004.php
Outdated
Show resolved
Hide resolved
apps/cloud_federation_api/lib/Migration/Version1015Date202502262004.php
Outdated
Show resolved
Hide resolved
apps/cloud_federation_api/lib/Migration/Version1015Date202502262004.php
Outdated
Show resolved
Hide resolved
apps/cloud_federation_api/lib/Migration/Version1015Date202502262004.php
Outdated
Show resolved
Hide resolved
apps/cloud_federation_api/lib/Migration/Version1015Date202502262004.php
Outdated
Show resolved
Hide resolved
apps/cloud_federation_api/lib/Migration/Version1015Date202502262004.php
Outdated
Show resolved
Hide resolved
The ui part of this, where you can create and delete invites are coming in a companion pr for the contacts app. |
apps/cloud_federation_api/lib/Migration/Version1015Date202502262004.php
Outdated
Show resolved
Hide resolved
|
When working on the front end part, I realized we need an event to react to, so I added that. |
ed681de to
ea3c60f
Compare
42458cb to
ea3c60f
Compare
|
@ArtificialOwl @miaulalala who can merge the PR now, if all the requirements are met? |
8a77b1b to
d925ff3
Compare
e3713f6 to
2616445
Compare
This patchset: * implements the /invite-accepted endpoint * adds capabilities and inviteAceptDialog to the discovery * adds a FederatedInviteAcceptedEvent https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1invite-accepted/post Co-authored-by: Anna <anna@nextcloud.com> Co-authored-by: Côme Chilliet <come.chilliet@nextcloud.com> Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com> Co-authored-by: Navid Shokri <navid.pdp11@gmail.com> Signed-off-by: Micke Nordin <kano@sunet.se>
|
@mickenordin @ArtificialOwl @sorbaugh accordign to @SystemKeeper this breaks talk federation at the moment, as "replaced".. at least the alias was removed: https://github.com/nextcloud/server/pull/51113/files#diff-b868f3fc169b78b9222fb4822eba2940dc6eccb4b8ea9df464366be45f059ef8 Accordign to @st3iny the old alias should stay. Should be fine since the new interface extends the old one: Perhaps add a deprecation notice to Also cc @icewind1991 and @nickvergessen given the impacted apps. |
|
There was not an intention for it to break. So the proposed solution is to revert this change on https://github.com/mickenordin/server/blob/623f2f0240016bbc142387741a44864ecb0458e2/lib/private/Server.php#L1275? The thinking was that this would work, since every ICapabilityAwareOCMProvider is an IOCMProvider, but maybe I thought about it backwards, and the above change should just be reverted? |
|
Relevant comments are here: |
That is true but some apps try to inject an If the new interface is supposed to replace the old one, a good way would be to deprecated the old interface and remove it later. To give apps some more time to react. I'm no DI expert but it should be possible to register both aliases at the same time. To not break existing apps but also give the opportunity to make use of the new functionality. Example from Talk/Spreed: public function __construct(
protected Config $talkConfig,
protected IOCMProvider $provider,
protected CloudFederationProviderTalk $talkProvider,
) {
}Will fail when ran against server master. |
Can they have the same name? I.e, can we do: |
Yes, that should work. I have another question: Is there a reason to split the logic in to two interfaces and keep both? Another possibility to just add the new methods from |
It was on the advice of @miaulalala that we did that, originally that was the way it was done. Anna was worried that doing it that way would break backwards compatibility as you can see from the most recent comments above, before it was merged. |
|
If we can quickly decide on the way we want to move forward, I can draft a PR for a fix. |
|
Adding both seems the easiest thing to do, so I created a PR for that. |
|
|
||
| $this->registerAlias(IPhoneNumberUtil::class, PhoneNumberUtil::class); | ||
|
|
||
| $this->registerAlias(IOCMProvider::class, OCMProvider::class); |
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.
This is a breaking change. The old and new alias need to be in place
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.
Summary
This patchset implements the /invite-accepted endpoint
https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1invite-accepted/post
A companion PR with UI for creating and otherwise lifecycle manage OCM invites is in the works for the Contacts app, but that work needs this first.