Skip to content
Snippets Groups Projects
Commit e2d0b1ad authored by Bogdan Cochior's avatar Bogdan Cochior
Browse files

fix(submit-revision): fix redirect when author submits revision

parent b4b3de30
No related branches found
No related tags found
1 merge request!13Sprint #14
......@@ -19,7 +19,7 @@ const generateCustomId = () =>
.toString()
.slice(-7)
export const isRevisionFlow = (state, collection, fragment) =>
export const isRevisionFlow = (state, collection, fragment = {}) =>
collection.fragments.length > 1 && !fragment.submitted
/* actions */
......
......@@ -117,8 +117,8 @@ async function applyAuthenticatedUserPolicy(user, operation, object, context) {
}
if (get(object, 'type') === 'fragment') {
if (helpers.isInDraft(object) && !helpers.isOwner({ user, object })) {
return false
if (helpers.isInDraft(object)) {
return helpers.isOwner({ user, object })
}
const userPermissions = await helpers.getUserPermissions({
......
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