From 70184d67bc6716fe4ea22e96eae6c8ad3cebb857 Mon Sep 17 00:00:00 2001 From: Mihail Hagiu <mihail.hagiu@thinslices.com> Date: Tue, 11 Dec 2018 15:51:05 +0200 Subject: [PATCH] fix(authsome-mode): eic manuscripts filtered by technicalchecks too --- packages/xpub-faraday/config/authsome-mode.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/xpub-faraday/config/authsome-mode.js b/packages/xpub-faraday/config/authsome-mode.js index d1c503c1b..07e4319c8 100644 --- a/packages/xpub-faraday/config/authsome-mode.js +++ b/packages/xpub-faraday/config/authsome-mode.js @@ -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] -- GitLab