SciCatProject / scicat-backend-next

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

remove job configuration in jobInstance to enable casl authorization #1395

Closed sofyalaski closed 2 months ago

sofyalaski commented 2 months ago

Description

Since we decided to not store the whole configuration in the jobInstance, the casl rules needed to be rewritten. Now the function for instance access accepts two arguments, the second being the object of jobConfig class, based on which rules are rewritten.

Motivation

Not storing the full job configuration in the job Instance. Job configuration is extracted based on the type of the job from the currently loaded configuration.

Fixes:

Passing API tests with mocha

Changes:

Tests included

Documentation

sofyalaski commented 2 months ago

Despina, I can also make a PR straight to release-jobs if you prefer. merging might be a pain..

sofyalaski commented 2 months ago

Hello Despina, yes, proposals error is new.. I think this was something that propagated from my cherry-picking a commit. I fixed the return code for that test to be same as a value in master