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

Make share results distinguishable if there are more than one with the same display name #24407

Open
1 of 4 tasks
Tracked by #3085
tobiasKaminsky opened this issue Nov 27, 2020 · 6 comments
Open
1 of 4 tasks
Tracked by #3085

Comments

@tobiasKaminsky
Copy link
Member

tobiasKaminsky commented Nov 27, 2020

@juliushaertl can you summarize how and what you do?
Is this all possible via ocs/v2.php/apps/files_sharing/api/v1/sharees ?

@juliushaertl
Copy link
Member

I'll write up some summary and try to add some mockups for better visualization of the various cases this should cover.

@juliushaertl juliushaertl self-assigned this Nov 27, 2020
@tstreibl

This comment has been minimized.

@tobiasKaminsky

This comment has been minimized.

@juliushaertl
Copy link
Member

The general problem is that the display name of a user is sometimes not enough to uniquely identify a person especially on context of larger organizations where there might be multiple people with the same name.

For that reason we would need some additional unique label being added to the displayname where this is relevant. For most cases the email addres should be a good unique identifier for this. For cases where there is no email address is set we would fall back to the user id, but that one might of course be rather cryptic e.g. in LDAP setups.

We basically have two options on when we want to show this:

  • we always show it
    • makes the UI more cluttered
    • might not be needed in most of the cases
  • we only show it if there are users with the same displayname shown somewhere in the UI
    • cleaner ui
    • might still make the user not be uniquely identifiable e.g. in the list of existing shares, if the file is only shared to one user with that duplicate display name

For now #23017 basically implements the second one, if neede we can still decide later on if we always want to show it.

The following mock ups should make it a bit clearer:

Keeping current behavior if display names are different

All matching users from the search have a unique display name so we don't show the unique label

image

Duplicate display names

THere are 4 users with the same display name, therefore we show the unique label. The first two have an email set, for the other two users there is no email so we fallback to the uid.

image

Share listing

We adapt the same behaviour to the share listing. The unique label is only shown for users where there are more entries with the same display name

image

API

With #23017 the unique label is returned as an extra field share_with_displayname_unique in the share listing api for each user share. This will be either the email or userid.

For the sharee search an extra attribute is exposed for each user result as shareWithDisplayNameUnique.

Determining if the label should be shown or not is up to the clients.

Feedback is welcome, especially from @jancborchardt 😉

@tstreibl

This comment has been minimized.

@jancborchardt
Copy link
Member

Great proposal @juliushaertl, have nothing more to add. @er-vin @tobiasKaminsky @marinofaggiana is this also feasible on mobile or do you see any issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants