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

Use display name instead of id for shared albums #1781

Merged
merged 3 commits into from
May 10, 2023

Conversation

artonge
Copy link
Collaborator

@artonge artonge commented May 10, 2023

Fix #1714

Before After
Screenshot from 2023-05-10 11-10-14 Screenshot from 2023-05-10 11-10-40
Screenshot from 2023-05-10 11-10-22 Screenshot from 2023-05-10 11-10-45
Screenshot from 2023-05-10 11-09-55 Screenshot from 2023-05-10 11-09-26

@artonge artonge enabled auto-merge May 10, 2023 09:08
@artonge artonge self-assigned this May 10, 2023
@artonge artonge added enhancement New feature or request 3. to review Waiting for reviews php PHP related ticket javascript Javascript related ticket labels May 10, 2023
@artonge artonge added this to the Nextcloud 27 milestone May 10, 2023
Signed-off-by: Louis Chemineau <[email protected]>
@artonge artonge changed the title Use display name instead of id in share album title Use display name instead of id for share albums May 10, 2023
@artonge artonge changed the title Use display name instead of id for share albums Use display name instead of id for shared albums May 10, 2023
@artonge artonge requested a review from skjnldsv May 10, 2023 09:12
@artonge
Copy link
Collaborator Author

artonge commented May 10, 2023

/backport to stable26

@artonge
Copy link
Collaborator Author

artonge commented May 10, 2023

/backport to stable25

@backportbot-nextcloud backportbot-nextcloud bot added the backport-request Pending backport by the backport-bot label May 10, 2023
@artonge artonge merged commit f336add into master May 10, 2023
@artonge artonge deleted the artonge/fix/use_display_name branch May 10, 2023 11:19
@backportbot-nextcloud
Copy link

The backport to stable26 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable26
git pull origin/stable26

# Create the new backport branch
git checkout -b fix/foo-stable26

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123

# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable26

More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport

@backportbot-nextcloud
Copy link

The backport to stable25 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable25
git pull origin/stable25

# Create the new backport branch
git checkout -b fix/foo-stable25

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123

# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable25

More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport

@pulsejet
Copy link
Member

I just want to point out that this potentially makes the name of the album ambiguous. For example, if two users with the same display name share an album with the same name to a user, then there's a conflict, and moving files to the album is ambiguous.

Notably, this could be an attack vector, since both the album name and display name can be changed by the user sharing the album. Of course there are non-malicious cases too, for example, two users named "Alice" sharing an album named "Christmas 2022" with Bob. The earlier behavior of using the username, on the other hand, was completely unambiguous.

@artonge @skjnldsv

@artonge
Copy link
Collaborator Author

artonge commented May 10, 2023

Ah yes indeed, that might have been why I used user ID back then. We could revert, but as userid is not really made for display, then we end up with potentially weird titles.

Other options could be to add both, display name then userid. Userid would be less visible. Or to add a title saying something like "Shared by userid".

We could also rethink how we list shared albums. Maybe having a section per users:

Display name 1 (userid1):
Album name 1 Album name 2 ....

Display name 2 (userid2):
....

@nextcloud/designers an opinion ?

@nimishavijay
Copy link
Member

Interesting problem! We generally don't use user IDs for display anywhere. There are cases even in other apps where this could happen, for example an event in a calendar with another person, or a file shared. So I think we can stick with showing just the display name :) We can always show the full name, which would help to differentiate to a certain extent.

@pulsejet
Copy link
Member

I'm not talking about UX. I think the UX is fine, but there is a correctness problem that stems from the lexical DAV API (i.e. we can no longer uniquely identify the two albums).

If we just (for example) used IDs to identify albums, then this issue would never arise. It would then even be perfectly valid to have two albums with the same name for one user, which we can't have right now because of the artificial limitation that the DAV API adds.

@artonge
Copy link
Collaborator Author

artonge commented May 11, 2023

Revert and improvement of the UI here: #1786

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews backport-request Pending backport by the backport-bot enhancement New feature or request javascript Javascript related ticket php PHP related ticket
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UUID displayed when searching a user while sharing an album
4 participants