fix(duplicate-flow): let users duplicate flows they have access to

This commit is contained in:
Ali BARIN
2024-08-08 09:22:53 +00:00
parent 58cd2c522e
commit 1a45ce5ea4

View File

@@ -41,7 +41,7 @@ const duplicateFlow = async (_parent, params, context) => {
context.currentUser.can('create', 'Flow');
const flow = await context.currentUser
.$relatedQuery('flows')
.authorizedFlows
.withGraphJoined('[steps]')
.orderBy('steps.position', 'asc')
.findOne({ 'flows.id': params.input.id })