Skip to content
Snippets Groups Projects
Commit 70184d67 authored by Mihail Hagiu's avatar Mihail Hagiu
Browse files

fix(authsome-mode): eic manuscripts filtered by technicalchecks too

parent 75ad60c6
No related branches found
No related tags found
3 merge requests!222Sprint #26,!217Sprint #26,!195feat(authsome-mode): Added rule for PATCH collection
......@@ -67,6 +67,9 @@ function unauthenticatedUser(operation, object, userId) {
const filterDraftCollections = c => get(c, 'status', 'draft') !== 'draft'
const filterTechnicalChecksCollections = c =>
get(c, 'status', 'draft') !== 'technicalChecks'
const filterNoFragmentCollections = c => c.fragments.length !== 0
const createPaths = ['/collections', '/collections/:collectionId/fragments']
......@@ -363,6 +366,7 @@ async function applyEditorInChiefPolicy(user, operation, object, context) {
return Promise.all(
collections
.filter(filterDraftCollections)
.filter(filterTechnicalChecksCollections)
.filter(filterNoFragmentCollections)
.map(async coll => {
const latestFragmentId = coll.fragments[coll.fragments.length - 1]
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment