diff --git a/packages/component-invite/config/authsome-helpers.js b/packages/component-invite/config/authsome-helpers.js index 5b6633a6150b55db19f733b1ef65351640ae6ccb..e30375101e82bc13c9d464ec8c4be74686c6c7d9 100644 --- a/packages/component-invite/config/authsome-helpers.js +++ b/packages/component-invite/config/authsome-helpers.js @@ -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'])) } diff --git a/packages/component-invite/config/authsome-mode.js b/packages/component-invite/config/authsome-mode.js index a2b8bd10f6659146281432af6fc7e66f0adc7790..2e3d8ea7faf8d5e86169de321d922bbc25c9a56d 100644 --- a/packages/component-invite/config/authsome-mode.js +++ b/packages/component-invite/config/authsome-mode.js @@ -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, diff --git a/packages/xpub-faraday/config/authsome-helpers.js b/packages/xpub-faraday/config/authsome-helpers.js index 5b6633a6150b55db19f733b1ef65351640ae6ccb..e30375101e82bc13c9d464ec8c4be74686c6c7d9 100644 --- a/packages/xpub-faraday/config/authsome-helpers.js +++ b/packages/xpub-faraday/config/authsome-helpers.js @@ -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'])) } diff --git a/packages/xpub-faraday/config/authsome-mode.js b/packages/xpub-faraday/config/authsome-mode.js index a2b8bd10f6659146281432af6fc7e66f0adc7790..364f8242e80c2e88f82a305ba617fb6fa4d6fdcf 100644 --- a/packages/xpub-faraday/config/authsome-mode.js +++ b/packages/xpub-faraday/config/authsome-mode.js @@ -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' &&