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

Set correct share type when listing shares #3759

Conversation

Excds
Copy link

@Excds Excds commented Mar 30, 2023

This fixes so that we can differentiate between guest/member users for shares.

Description

List Shares

When listing shares on a file/folder with a GET on the following endpoint: /ocs/v1.php/apps/files_sharing/api/v1/shares the entities in the response have a shareType of 0 for all users, no matter if they are guests or not at the time of the request (already implemented like that). However, we need an additional attribute share_with_user_type for the shares where the user represented by the share_with* attributes is a guest (value 1) or not a guest (value 0) at the time of the request. The reason for this additional attribute instead of a shareType 0 vs 4 is that we don't want the need to migrate shares when a guest user becomes a non-guest or vice versa.

List sharees (share candidates)

when searching for potential sharees on a file/folder with a GET on the following endpoint:
/ocs/v2.php/apps/files_sharing/api/v1/sharees?search=ein the entities in the response have a shareType and a userType. shareType needs to be 0 and userType needs to be 1 for users that are guests at the time of the request. We pulled that out of demo.owncloud.com

@Excds @kobergj FYI

@Excds Excds requested review from a team, labkode, ishank011 and glpatcern as code owners March 30, 2023 10:26
@Excds Excds force-pushed the set_correct_share_type_when_listing_and_adding_sharees branch from e72c96d to b6d5f05 Compare March 30, 2023 10:26
@micbar micbar force-pushed the set_correct_share_type_when_listing_and_adding_sharees branch from a880af6 to a9a93ef Compare March 31, 2023 13:14
@micbar micbar force-pushed the set_correct_share_type_when_listing_and_adding_sharees branch from a9a93ef to 45bcf92 Compare March 31, 2023 14:16
Copy link

@dragonchaser dragonchaser left a comment

Choose a reason for hiding this comment

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

thx, lgtm

@micbar micbar merged commit eca8953 into cs3org:edge Mar 31, 2023
@micbar micbar mentioned this pull request May 3, 2023
89 tasks
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.

3 participants