-
-
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
New share provider: Share by mail #657
Conversation
@schiessle, thanks for your PR! By analyzing the annotation information on this pull request, we identified @rullzer, @blizzz and @nickvergessen to be potential reviewers |
@jancborchardt I'm sure that's also interesting to you 😉 |
missing from shipped.json |
While I think the idea is good. The UX there is terrible. Basically it should fall back to sending the e-mail if no remote is found. |
/* | ||
* Check if file is not already shared with the remote user | ||
*/ | ||
$alreadyShared = $this->getSharedWith($shareWith, self::SHARE_TYPE_REMOTE, $share->getNode(), 1, 0); |
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.
SHARE_TYPE_EMAIL
?
The share provider looks like a lot of duplicate code from the other share providers, probably worth it having a go at factoring out the common logic |
@schiessle awesome! :) Great that you’re pushing this! I tend to agree with @rullzer – it’s a bit strange at the moment that you need to decide between remote and email. It should check automatically if a remote by that ID exists – if not share via email. Also, can we tune that dropdown so that to the left of the remote user it shows their avatar (or colored circle with initial) and next to email it shows an email icon? Or do we need to do a major rewire for that? |
yes, that's mainly copy&pasted from the federated share provider... This will change a lot, you can ignore it for now |
I'm not sure. This would mean that you would first hand the share to the federated share provider, which would try to create a share. If it fails it would return to the share manager which would then try to do a mail share. But it could also happen that it is a federated share id and the server is just temporarily not available. In this case it would make more sense to re-try it later (with a background job) instead of falling back to email which will fail because for most user email address and federated share ID will not be the same. Such a behavior is also completely in-transparent to the user. I tend to let the user explicitly decide what he want to do. In case we find a exact match of a federated share or a email address we can hide the other option because it is really unlikely that a user has the exact same email address and federated cloud id. But if we enter something for the first time I would just let the user chose.
We don't have a avatar if your share with a user for the first time... Let's keep this for later. This is out of scope for this PR. |
Nextcloud tends to do stuff automatically. ;) If you share something with me via email – either cause my server is not available or you don’t have my federated cloud ID – it could be added to my Nextcloud as a federated share and communicated back to your server like that. Just automatically, there should be no difference and there doesn’t need to be, because in both cases you have the control over if I »can edit« or not. |
Uhmm ... Isnt this covered by owncloud/core#25576 |
Unfortunately it is not that easy 😉 If I entered your cloud ID and your server is offline I can't send it to you by mail because in most cases both are not the same. And I will never know that sending the email failed. Let me try to illustrate the two possible scenarios if we try to make it automatically:
So we have two solutions to automate it and both don't work. |
@MariusBluem link doesn't work |
Was updated 1 minute later 😒 ... The /pull/ was missing 😉 @schiessle |
@Mar1u5 As you said, it is something different. I don't want to have a way to share a public link by mail, this is already today possible. But to create multiple public links, one for each recipient transparent in the share dialog |
199bc25
to
9e607f6
Compare
cc @Rocco83 because this is the »generate unique link per email address so revocation on a per-person basis is possible« feature you are interested in. :) |
9e607f6
to
9701f31
Compare
@schiessle any progress on this? Do you need any help or reviews? :) |
367298e
to
7384940
Compare
Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
…ooks Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
email address we only return the exact match. It is highly unlikely that the exact same email address and federated cloud id exists Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
…ail shares Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
…hare provider is enabled Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Bjoern Schiessle <[email protected]>
cbbfe95
to
f2b2b8d
Compare
Done. I also added a lot of unit tests (cc @LukasReschke)... Final review round 😉 |
I'd say lets get this in 👍 |
LGTM |
@nickvergessen Your call now ;) |
Yeah lets do that... |
* now handled by sharebymail app * see #657 Signed-off-by: Morris Jobke <[email protected]>
This introduces a new share provider called "Share by mail" which allows you to enter a email address to the share dialog and send a personalized link.
This is work in progress, but at least the auto-complete function works already.
Fix #1703