Commit 451bcf63 authored by Giannis Kopanas's avatar Giannis Kopanas

fix(authsome): add review page rules

parent a0a5a5c4
......@@ -594,6 +594,10 @@ class XpubCollabraMode {
return this.checkPageSubmit(params)
}
if (path === '/projects/:project/versions/:version/reviews') {
return this.checkPageReviews(params)
}
if (
path === '/projects/:project/versions/:version/review' ||
path === '/projects/:project/versions/:version/reviewers'
......@@ -641,6 +645,17 @@ class XpubCollabraMode {
return permission
}
async checkPageReviews(params) {
const fragment = this.context.models.Fragment.find(params.version)
const permission = await this.checkTeamMembers(
['isAssignedReviewerEditor'],
fragment,
)
return permission
}
async checkPageReview(params) {
const collection = this.context.models.Collection.find(params.project)
......
......@@ -19,7 +19,7 @@ module.exports = {
source: Joi.string().allow(''), // TODO: move to a file
metadata: Joi.object({
title: Joi.string(),
abstract: Joi.string(),
abstract: Joi.string().allow(''),
articleType: Joi.string(),
articleSection: Joi.array().items(Joi.string()),
authors: Joi.array(),
......
......@@ -32,8 +32,8 @@ test.before(async t => {
.eql('0')
.expect(dashboard.manuscriptStatus(2).innerText)
.contains('SUBMITTED')
.expect(await Selector(dashboard.controlPanel).exists)
.ok()
// .expect(await Selector(dashboard.controlPanel).exists)
// .ok()
await t.click(dashboard.controlPanel).wait(2000)
......
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