Skip to content
Snippets Groups Projects
Commit 70740a0c authored by Tania Fecheta's avatar Tania Fecheta
Browse files

fix(canauthorViewEditorialComments): change statuses in which author cannot view editorial comments

parent 53208576
No related branches found
No related tags found
2 merge requests!110Sprint 21 Features,!93Hin 1013
...@@ -61,12 +61,13 @@ export const canViewReviewersDetails = (state, collection = {}) => { ...@@ -61,12 +61,13 @@ export const canViewReviewersDetails = (state, collection = {}) => {
return canViewReports(state, collection.id) return canViewReports(state, collection.id)
} }
const canAuthorViewEditorialCommentsStatuses = [ const cannotAuthorViewEditorialCommentsStatuses = [
'accepted', 'draft',
'rejected', 'technicalChecks',
'revisionRequested', 'submitted',
'underReview', 'heInvited',
'reviewCompleted', 'heAssigned',
'reviewersInvited',
] ]
export const canAuthorViewEditorialComments = ( export const canAuthorViewEditorialComments = (
...@@ -77,7 +78,7 @@ export const canAuthorViewEditorialComments = ( ...@@ -77,7 +78,7 @@ export const canAuthorViewEditorialComments = (
const isAuthor = currentUserIsAuthor(state, fragmentId) const isAuthor = currentUserIsAuthor(state, fragmentId)
return ( return (
isAuthor && isAuthor &&
canAuthorViewEditorialCommentsStatuses.includes( !cannotAuthorViewEditorialCommentsStatuses.includes(
get(collection, 'status', 'draft'), get(collection, 'status', 'draft'),
) )
) )
......
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