From 70740a0c3a5200c204790a35a6be3fc26ab6fd2b Mon Sep 17 00:00:00 2001
From: Tania Fecheta <tania.fecheta@thinslices.com>
Date: Wed, 17 Oct 2018 16:05:58 +0300
Subject: [PATCH] fix(canauthorViewEditorialComments): change statuses in which
 author cannot view editorial comments

---
 packages/component-faraday-selectors/src/index.js | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/packages/component-faraday-selectors/src/index.js b/packages/component-faraday-selectors/src/index.js
index efb199517..8969b158d 100644
--- a/packages/component-faraday-selectors/src/index.js
+++ b/packages/component-faraday-selectors/src/index.js
@@ -61,12 +61,13 @@ export const canViewReviewersDetails = (state, collection = {}) => {
   return canViewReports(state, collection.id)
 }
 
-const canAuthorViewEditorialCommentsStatuses = [
-  'accepted',
-  'rejected',
-  'revisionRequested',
-  'underReview',
-  'reviewCompleted',
+const cannotAuthorViewEditorialCommentsStatuses = [
+  'draft',
+  'technicalChecks',
+  'submitted',
+  'heInvited',
+  'heAssigned',
+  'reviewersInvited',
 ]
 
 export const canAuthorViewEditorialComments = (
@@ -77,7 +78,7 @@ export const canAuthorViewEditorialComments = (
   const isAuthor = currentUserIsAuthor(state, fragmentId)
   return (
     isAuthor &&
-    canAuthorViewEditorialCommentsStatuses.includes(
+    !cannotAuthorViewEditorialCommentsStatuses.includes(
       get(collection, 'status', 'draft'),
     )
   )
-- 
GitLab