feat(authorization): add create flow checks

This commit is contained in:
Ali BARIN
2023-06-23 21:25:20 +00:00
parent 181cb5f335
commit af29dc9c3f
2 changed files with 4 additions and 0 deletions

View File

@@ -14,6 +14,8 @@ const createFlow = async (
params: Params,
context: Context
) => {
context.currentUser.can('create', 'Flow');
const connectionId = params?.input?.connectionId;
const appKey = params?.input?.triggerAppKey;

View File

@@ -53,6 +53,8 @@ const duplicateFlow = async (
params: Params,
context: Context
) => {
context.currentUser.can('create', 'Flow');
const flow = await context.currentUser
.$relatedQuery('flows')
.withGraphJoined('[steps]')