feat: Implement get app connections API endpoint

This commit is contained in:
Faruk AYDIN
2024-03-29 00:21:58 +01:00
parent 7c1473ea95
commit 5c79e374dd
7 changed files with 170 additions and 1 deletions

View File

@@ -155,6 +155,13 @@ class User extends Base {
return conditions.isCreator ? this.$relatedQuery('steps') : Step.query();
}
get authorizedConnections() {
const conditions = this.can('read', 'Connection');
return conditions.isCreator
? this.$relatedQuery('connections')
: Connection.query();
}
get authorizedExecutions() {
const conditions = this.can('read', 'Execution');
return conditions.isCreator