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

resources: add param to filter shared with my uploads #1956

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

zzacharo
Copy link
Member

@zzacharo zzacharo commented Feb 15, 2025

closes #1948

* returns record needs on entity resolution
* reindex associated request on parent access changes
@zzacharo zzacharo marked this pull request as draft February 17, 2025 10:44
@zzacharo zzacharo marked this pull request as ready for review February 20, 2025 15:40

if params.get("shared_with_me") is True:
# Shared with me
return search.filter(~my_uploads)
Copy link
Member

Choose a reason for hiding this comment

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

Is a record not owned by me necessarily shared with me?
Can there be other use cases, maybe related to communities, where a record was not explicitly shared with me, but where I am also not the owner?

Copy link
Contributor

Choose a reason for hiding this comment

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

Basically does this mean that on a community inclusion, will it appear as "shared with me", when it's not the case right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Exactly, you will see all your community related requests there. In principle, the shared with me is at the moment an umbrella to see all the records that yourself didn't create.

Copy link
Contributor

@jrcastro2 jrcastro2 left a comment

Choose a reason for hiding this comment

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

Isort failing, peer-reviewed with @sakshamarora1

@@ -97,7 +97,7 @@
from .schemas.tombstone import TombstoneSchema
from .search_params import (
MetricsParam,
MyDraftsParam,
MyOrSharedWIthMeDraftsParam,
Copy link
Contributor

@jrcastro2 jrcastro2 Feb 21, 2025

Choose a reason for hiding this comment

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

Maybe a better name could be (as in the other PR):

Suggested change
MyOrSharedWIthMeDraftsParam,
SharedOrMineDraftsParam,


if params.get("shared_with_me") is True:
# Shared with me
return search.filter(~my_uploads)
Copy link
Contributor

Choose a reason for hiding this comment

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

Basically does this mean that on a community inclusion, will it appear as "shared with me", when it's not the case right?

@zzacharo
Copy link
Member Author

Regarding #1956 (comment) : Yes if you have access you will see it in the shared view. So, a community inclusion to a community you can curate gives you access to the record.

# Update parent request on access changes
#

def _update_parent_request(self, parent, uow):
Copy link
Contributor

Choose a reason for hiding this comment

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

just for my information to understand how this works: why is it needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is needed so when a user changes the access in a record via the share button, the record/request is shown to the user that the record was shared with under their dashboard.

@zzacharo
Copy link
Member Author

zzacharo commented Mar 3, 2025

Regarding #1956 (comment) : Yes if you have access you will see it in the shared view. So, a community inclusion to a community you can curate gives you access to the record.

that is now changed to not include community related uploads/requests

@zzacharo zzacharo force-pushed the shared-uploads branch 2 times, most recently from 8759d15 to cd9e6ab Compare March 4, 2025 13:18
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.

Sharing a draft/record doesn't give access to corresponding record requests
4 participants