feat(authorization): add read connection checks

This commit is contained in:
Ali BARIN
2023-06-23 20:20:42 +00:00
parent 63abc8a2c8
commit c37c70446d
3 changed files with 6 additions and 2 deletions

View File

@@ -6,6 +6,8 @@ type Params = {
};
const getApp = async (_parent: unknown, params: Params, context: Context) => {
context.currentUser.can('read', 'Connection');
const app = await App.findOneByKey(params.key);
if (context.currentUser) {