Commit 2f7866d9 authored by Yannis Barlas's avatar Yannis Barlas

fix(reviewer panel): fix case where reviewer would see the form

parent 0d6915cc
......@@ -241,6 +241,7 @@ const Submit = props => {
isAcceptedReviewerForVersion,
isAuthor,
isGlobal,
isReviewer,
loading,
saveForm,
sendAuthorChatMessage,
......@@ -412,7 +413,7 @@ const Submit = props => {
if (!full) {
if (editableByAuthor) {
if (underRevision && isGlobal && !isAuthor) {
if (underRevision && ((isGlobal && !isAuthor) || isReviewer)) {
display = editorView
} else {
display = isGlobal && !isAuthor ? preview : form
......
......@@ -97,6 +97,9 @@ const ComposedSubmit = props => {
)
const { isAcceptedReviewerForVersion, isGlobal } = currentUser.auth
const isAuthor = currentUser.auth.isAuthor.includes(articleId)
const isReviewer = currentUser.auth.isAcceptedReviewerForManuscript.includes(
articleId,
)
const [activeTab, setActiveTab] = useState(null)
const [locked, setLocked] = useState(true)
......@@ -118,6 +121,7 @@ const ComposedSubmit = props => {
isAcceptedReviewerForVersion,
isAuthor,
isGlobal,
isReviewer,
...mappedProps,
})
}
......
Markdown is supported
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