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

ACAS-699: Pass list of projects to backend to filter projects by acls #1109

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

brianbolt
Copy link
Contributor

@brianbolt brianbolt commented Aug 15, 2023

Description

  • ACAS node changes for restricting /api/experiments/protocolCodename/:code
  • Pass allowed projects to the backend for filtering

Bug description

To reproduce
Create an experiment in a restricted project and login as a user who does not have access to that project.
Go to the protocol browser window and search for the protocol
Scroll down to the section titled: "Experiments using"
Expectation
Experiment in restricted project that the user does not have access to is not displayed

Actual outcome
Experiment in restricted project that the user does not have access to is displayed.

Screenshot 2023-08-14 at 6 27 03 PM

Technical details
This feature relies on the ACAS route here

app.get '/api/experiments/protocolCodename/:code', loginRoutes.ensureAuthenticated, exports.experimentsByProtocolCodename
:
app.get '/api/experiments/protocolCodename/:code', loginRoutes.ensureAuthenticated, exports.experimentsByProtocolCodename
This route does not pay attention to acls and therefore experiments are not filtered.

Related Issue

ACAS-699

How Has This Been Tested?

Ran acasclient tests including new tests added here for this case: mcneilco/acasclient#138

Copy link
Contributor

@hhan-schrodinger hhan-schrodinger left a comment

Choose a reason for hiding this comment

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

Makes sense - looks good to me!

@brianbolt brianbolt merged commit fd19999 into release/2023.2.x Aug 17, 2023
2 of 3 checks passed
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.

2 participants