feat(authorization): add create connection checks

This commit is contained in:
Ali BARIN
2023-06-23 21:14:32 +00:00
parent 8a71c13078
commit 4086fad867
5 changed files with 10 additions and 0 deletions

View File

@@ -13,6 +13,8 @@ const generateAuthUrl = async (
params: Params,
context: Context
) => {
context.currentUser.can('create', 'Connection');
const connection = await context.currentUser
.$relatedQuery('connections')
.findOne({