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

Restrict RHS compound set visibility by target AND target access string #1552

Open
mwinokan opened this issue Oct 22, 2024 · 6 comments
Open
Assignees
Labels

Comments

@mwinokan
Copy link
Collaborator

E.g. currently in staging there are two versions of A71EV2A, and one under lb32627-66 and the other under lb32627-71.

I uploaded a RHS dataset to lb32627-66 but it also shows up under lb32627-71:
Screenshot 2024-10-22 at 14 54 10

@matej-vavrek can you please check that the f/e requests only the compound sets with the correct target name AND target access string/proposal?

@matej-vavrek
Copy link
Collaborator

@mwinokan, it seems that we are fetching target via api/targets/?title=A71EV2A . @kaliif but I see in API filter options only title so adding access string like for example api/targets/?title=A71EV2A&target_access_string=lb18145-1 probably will not have any effect or?

@kaliif
Copy link
Collaborator

kaliif commented Oct 24, 2024

@matej-vavrek adding TAS to filter fields is not a problem, but even without it, the backend should not return data from other proposals. This is possibly more a backend issue than a frontend.

@kaliif kaliif added the backend label Oct 24, 2024
@kaliif
Copy link
Collaborator

kaliif commented Oct 24, 2024

Looking at this issue a bit more closely, @matej-vavrek why do you need to look up target here? api/compound-sets/ endpoint allows you to filter by target ID, if you have that available, you can fetch the correct compound set. @mwinokan if you can confirm that you are a member in both proposals and there's no data leak, I think that would solve the problem.

I can of course add additional fields to filters if that makes anyone's life more comfortable.

@kaliif
Copy link
Collaborator

kaliif commented Oct 24, 2024

When debugging this, something I observed when uploading the same compound set to multiple targets - if the set name was the same, no new compound set was created but later uploads overwrote earlier ones. That's because the compound set's name is at the moment unique and used as the primary key in the database. @mwinokan can you confirm that now that targets can exist under multiple proposals, this is not the correct behaviour anymore and the same compound set can be uploaded to different targets creating separate compound sets? Or have I misunderstood this?

@mwinokan
Copy link
Collaborator Author

Thanks @kaliif, indeed the same target name under different proposals should be treated as a separate project with its own compound sets, etc.

I noticed that the same kind of issue exists with SiteObservationTags, but I concluded that this was actually a useful behaviour

@matej-vavrek
Copy link
Collaborator

matej-vavrek commented Oct 28, 2024

Looking at this issue a bit more closely, @matej-vavrek why do you need to look up target here? api/compound-sets/ endpoint allows you to filter by target ID, if you have that available, you can fetch the correct compound set. @mwinokan if you can confirm that you are a member in both proposals and there's no data leak, I think that would solve the problem.

I can of course add additional fields to filters if that makes anyone's life more comfortable.

I am not sure if I understand correctly @kaliif. When is some target choosed from the target list at the main page we get that target and then it loads the other data.

Edit: we are fetching from api/compound-sets/ by target ID
https://fragalysis-matej-default.xchem-dev.diamond.ac.uk/api/compound-sets/?target=1

@mwinokan mwinokan moved this from Backlog to Orange in Fragalysis Nov 7, 2024
@mwinokan mwinokan moved this from Orange to In staging - assess function vs spec in Fragalysis Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In staging - assess function vs spec
Development

No branches or pull requests

3 participants