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

Shared with a group and a member of this group resource appears as 2 shares in "Shared with me" #7582

Closed
elizavetaRa opened this issue Sep 5, 2022 · 5 comments · Fixed by #7598

Comments

@elizavetaRa
Copy link
Member

Steps to reproduce

  1. Share resource with a group
  2. Share resource with user who is group member
  3. As sharee go to "Shared with me" section

Expected behaviour

Share appears as one, share indicators show user and group

Actual behaviour

Share appears as 2 shares
Screenshot from 2022-09-01 18-43-31

@elizavetaRa elizavetaRa changed the title shared with a group and a member of this group resource appears as 2 shares in "Shared with me" Shared with a group and a member of this group resource appears as 2 shares in "Shared with me" Sep 5, 2022
@elizavetaRa
Copy link
Member Author

@kulmann

@elizavetaRa
Copy link
Member Author

elizavetaRa commented Sep 5, 2022

@kulmann Found the problem. The backend request inpackages/web-app-files/src/services/folder/loaderSharedWithMe.tsreturns shares in random order. Whenever the group share and user of this group share are next to each other, they get merged into one in addSharedWithToShares. But when not, it doesn't happen. Is the returned shares list supposed to be sorted by path in the backend? Then it would be a backend bug, otherwise needs sorting before addSharedWithToShares

@kulmann
Copy link
Member

kulmann commented Sep 7, 2022

@kulmann Found the problem. The backend request inpackages/web-app-files/src/services/folder/loaderSharedWithMe.tsreturns shares in random order. Whenever the group share and user of this group share are next to each other, they get merged into one in addSharedWithToShares. But when not, it doesn't happen. Is the returned shares list supposed to be sorted by path in the backend? Then it would be a backend bug, otherwise needs sorting before addSharedWithToShares

Good that you found it, thank you for digging into it 💪 The backend is not supposed to sort anything at the moment. We're still at sorting only happens in the client.

@elizavetaRa
Copy link
Member Author

@kulmann we have a fix for it, do you want a pr? cernbox@cb6d25a

@kulmann
Copy link
Member

kulmann commented Sep 7, 2022

@kulmann we have a fix for it, do you want a pr? cernbox@cb6d25a

PR would be awesome, thank you!

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

Successfully merging a pull request may close this issue.

2 participants