QutEcoacoustics / baw-server

The acoustic workbench server for storing and managing ecoacoustic data. Manages the structure and audio data. Provides an API for clients access.
Apache License 2.0
9 stars 4 forks source link

Harvest: substituting and incorrect project id in the route does not throw an error #593

Closed atruskie closed 2 years ago

atruskie commented 2 years ago

GET https://api.staging.ecosounds.org/projects/1041/harvests/11

GET https://api.staging.ecosounds.org/projects/1135/harvests/11

One of these should fail, but in testing, when a user has access to both project, both succeed.

atruskie commented 2 years ago

https://github.com/QutEcoacoustics/baw-server/blob/886845499be85733990cd9ec2af39a321ff260de/app/controllers/harvests_controller.rb#L135-L140