SciCatProject / scicat-backend-next

SciCat Data Catalogue Backend
https://scicatproject.github.io/documentation/
BSD 3-Clause "New" or "Revised" License
20 stars 21 forks source link

fix(casl-ability): correct instrument endpoint access for unauthentic… #1393

Closed Junjiequan closed 1 month ago

Junjiequan commented 1 month ago

…ated users

Description

This PR aims to fix instrument endpoint access for unauthenticated users.

Motivation

Fixes:

Changes:

changed from cannot(Action.InstrumentRead, Instrument) to can(Action.InstrumentRead, Instrument);

Tests included

Documentation

official documentation info

If you have updated the official documentation, please provide PR # and URL of the pages where the updates are included

Junjiequan commented 1 month ago

I assume this is correct since information about the instrument is probably available on the facilities website too..?

Yes. If we check the instruments schema, it contains no access or ownership related fields.