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

fix(reviewerReports): let an invited reviwer on the second version to see the...

fix(reviewerReports): let an invited reviwer on the second version to see the editorial comments and
parent 7f82b580
No related branches found
No related tags found
2 merge requests!176Sprint 24,!171Sprint 24
......@@ -96,6 +96,7 @@ const authorAndReviewersCanViewReportsDetailsStatuses = [
'rejected',
'accepted',
'reviewCompleted',
'reviewersInvited',
'inQa',
]
......@@ -166,6 +167,7 @@ const canReviewerViewEditorialCommentsStatuses = [
'reviewCompleted',
'pendingApproval',
'revisionRequested',
'reviewersInvited',
]
export const canReviewerViewEditorialComments = (
state,
......@@ -554,11 +556,12 @@ export const getVersionOptions = (state, collection = {}) => {
export const canReview = (state, collection = {}, fragment = {}) => {
const fragmentId = get(fragment, 'id', false)
if (!fragmentId) return false
const ownRecommendation = getOwnRecommendations(state, fragmentId)
const isReviewer = currentUserIsReviewer(state, fragmentId)
if (!isReviewer) return false
return get(collection, 'status', 'draft') === 'underReview'
return (
get(collection, 'status', 'draft') === 'underReview' &&
ownRecommendation.length === 0
)
}
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