mcneilco / acas

http://mcneilco.com/acas.html
GNU General Public License v3.0
12 stars 5 forks source link

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

Closed brianbolt closed 1 year ago

brianbolt commented 1 year ago

Description

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 https://github.com/mcneilco/acas/blob/b8719989a424da9ccbc571a84c118d213774eaf3/modules/ServerAPI/src/server/routes/ExperimentServiceRoutes.coffee#L32: 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: https://github.com/mcneilco/acasclient/pull/138