feat: Implement get step connection API endpoint

This commit is contained in:
Faruk AYDIN
2024-03-13 15:24:50 +01:00
parent d6923a2ff0
commit 9a0434be32
7 changed files with 186 additions and 0 deletions

View File

@@ -149,6 +149,11 @@ class User extends Base {
return conditions.isCreator ? this.$relatedQuery('flows') : Flow.query();
}
get authorizedSteps() {
const conditions = this.can('read', 'Flow');
return conditions.isCreator ? this.$relatedQuery('steps') : Step.query();
}
get authorizedExecutions() {
const conditions = this.can('read', 'Execution');
return conditions.isCreator