Skip to content
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

Render additional share with info in ocs sharing api #1451

Merged
merged 1 commit into from
Feb 4, 2021

Conversation

butonic
Copy link
Contributor

@butonic butonic commented Feb 4, 2021

Recipients can now be distinguished by their email, which is rendered as additional info in the ocs api for share and file owners as well as share recipients.

Fixes owncloud/ocis#1190

@butonic butonic requested a review from labkode as a code owner February 4, 2021 10:19
ShareWith: u.Username,
// api compatability with oc10: always use the username
ShareWith: u.Username,
ShareWithAdditionalInfo: u.Mail,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oc10 lets the admin decide if the additional info should be Mail or UserID. For full compatibility you could make the attribute configurable here as well 🤷

Copy link
Contributor Author

@butonic butonic Feb 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe later. For now, I just want to be able to distinguish the users. And email is what users know from their email client. Furthermore, for guests the username equals the email. Since we want to unify sharing with people I prefer the mail.

When searching recipients, the username is available as the shareWith, anyway. The Displayname is in the Label ... which only leaves email 🤷‍♂️

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But with this PR we'll lose the option to hide it. Because ownCloud Web renders the ShareWithAdditionalInfo as soon as it exists. Unnecessary info for small instances... 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is unnecessary. I think we should align on emails because they allow using the federated discovery mechanism described by openid connect. phoenix could actually do that instead of using the ocs api ... or ... well ... in addition ...

but that is a product management decision.

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@butonic butonic changed the title Render additional share with in ocs sharing api Render additional share with inf in ocs sharing api Feb 4, 2021
@butonic butonic changed the title Render additional share with inf in ocs sharing api Render additional share with info in ocs sharing api Feb 4, 2021
gatewayAddr string
publicURL string
sharePrefix string
userIdentifierCache *ttlmap.TTLMap
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use github.com/ReneKroon/ttlcache which I used for the etag cache.

@ishank011 ishank011 merged commit 8160a93 into cs3org:master Feb 4, 2021
@butonic butonic deleted the additional-share-with branch February 4, 2021 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show username in collaborators/share tab
3 participants