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 = {}) => {
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'),
)
)
......
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