Skip to content
Snippets Groups Projects
Commit fae2513b authored by Sebastian Mihalache's avatar Sebastian Mihalache
Browse files

feat(component-invite): update parse method name in authsome

parent 743a95e8
No related branches found
No related tags found
1 merge request!8Sprint #10
......@@ -7,7 +7,7 @@ const statuses = config.get('statuses')
const publicStatusesPermissions = ['author', 'reviewer']
module.exports = {
parseReviewerAuthors: (coll, matchingCollPerm) => {
parseAuthorsData: (coll, matchingCollPerm) => {
if (['reviewer'].includes(matchingCollPerm.permission)) {
coll.authors = coll.authors.map(a => omit(a, ['email']))
}
......
......@@ -34,7 +34,7 @@ async function teamPermissions(user, operation, object, context) {
return null
}
helpers.setPublicStatuses(coll, matchingCollPerm)
helpers.parseReviewerAuthors(coll, matchingCollPerm)
helpers.parseAuthorsData(coll, matchingCollPerm)
if (
['reviewer', 'handlingEditor'].includes(
matchingCollPerm.permission,
......
......@@ -7,7 +7,7 @@ const statuses = config.get('statuses')
const publicStatusesPermissions = ['author', 'reviewer']
module.exports = {
parseReviewerAuthors: (coll, matchingCollPerm) => {
parseAuthorsData: (coll, matchingCollPerm) => {
if (['reviewer'].includes(matchingCollPerm.permission)) {
coll.authors = coll.authors.map(a => omit(a, ['email']))
}
......
......@@ -34,7 +34,7 @@ async function teamPermissions(user, operation, object, context) {
return null
}
helpers.setPublicStatuses(coll, matchingCollPerm)
helpers.parseReviewerAuthors(coll, matchingCollPerm)
helpers.parseAuthorsData(coll, matchingCollPerm)
if (
['reviewer', 'handlingEditor'].includes(
matchingCollPerm.permission,
......@@ -153,7 +153,7 @@ async function authenticatedUser(user, operation, object, context) {
}
}
// only allow the HE to create, delete an invitation, or get inv details`
// only allow the HE to create, delete an invitation, or get invitation details
if (
['POST', 'GET', 'DELETE'].includes(operation) &&
get(object.collection, 'type') === 'collection' &&
......
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