Merge pull request #2019 from automatisch/aut-1093
fix(duplicate-flow): let users duplicate flows they have access to
This commit is contained in:
@@ -41,7 +41,7 @@ const duplicateFlow = async (_parent, params, context) => {
|
|||||||
context.currentUser.can('create', 'Flow');
|
context.currentUser.can('create', 'Flow');
|
||||||
|
|
||||||
const flow = await context.currentUser
|
const flow = await context.currentUser
|
||||||
.$relatedQuery('flows')
|
.authorizedFlows
|
||||||
.withGraphJoined('[steps]')
|
.withGraphJoined('[steps]')
|
||||||
.orderBy('steps.position', 'asc')
|
.orderBy('steps.position', 'asc')
|
||||||
.findOne({ 'flows.id': params.input.id })
|
.findOne({ 'flows.id': params.input.id })
|
||||||
|
Reference in New Issue
Block a user