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

feat(authsome): fix return in authsome

parent 88840107
No related branches found
No related tags found
1 merge request!8Sprint #10
...@@ -32,7 +32,7 @@ const filterObjectData = (collectionsPermissions, object, user) => { ...@@ -32,7 +32,7 @@ const filterObjectData = (collectionsPermissions, object, user) => {
const matchingCollPerm = collectionsPermissions.find( const matchingCollPerm = collectionsPermissions.find(
collPerm => object.id === collPerm.fragmentId, collPerm => object.id === collPerm.fragmentId,
) )
if (matchingCollPerm === undefined) return {} if (matchingCollPerm === undefined) return null
if (['reviewer'].includes(matchingCollPerm.permission)) { if (['reviewer'].includes(matchingCollPerm.permission)) {
object.files = omit(object.files, ['coverLetter']) object.files = omit(object.files, ['coverLetter'])
} }
...@@ -42,7 +42,7 @@ const filterObjectData = (collectionsPermissions, object, user) => { ...@@ -42,7 +42,7 @@ const filterObjectData = (collectionsPermissions, object, user) => {
const matchingCollPerm = collectionsPermissions.find( const matchingCollPerm = collectionsPermissions.find(
collPerm => object.id === collPerm.id, collPerm => object.id === collPerm.id,
) )
if (matchingCollPerm === undefined) return {} if (matchingCollPerm === undefined) return null
setPublicStatuses(object, matchingCollPerm) setPublicStatuses(object, matchingCollPerm)
parseAuthorsData(object, matchingCollPerm) parseAuthorsData(object, matchingCollPerm)
if (['reviewer', 'handlingEditor'].includes(matchingCollPerm.permission)) { if (['reviewer', 'handlingEditor'].includes(matchingCollPerm.permission)) {
......
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