From c4197a1ece00ffbf3c4066e99bdcd31e46ea801e Mon Sep 17 00:00:00 2001 From: Theresa Kamerman Date: Tue, 27 Jun 2023 10:54:06 -0700 Subject: [PATCH] Add delete permissions --- .../databases/AerieMerlin/tables/public_constraint.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/deployment/hasura/metadata/databases/AerieMerlin/tables/public_constraint.yaml b/deployment/hasura/metadata/databases/AerieMerlin/tables/public_constraint.yaml index ae27bf5679..41166e6c59 100644 --- a/deployment/hasura/metadata/databases/AerieMerlin/tables/public_constraint.yaml +++ b/deployment/hasura/metadata/databases/AerieMerlin/tables/public_constraint.yaml @@ -55,3 +55,11 @@ update_permissions: { "mission_model": { "plans": { "owner": { "_eq": "X-Hasura-User-Id" } } } } ] } set: updated_by: "x-hasura-user-id" +delete_permissions: + - role: user + permission: + filter: {"_or": [ + {"plan":{"owner":{"_eq":"X-Hasura-User-Id"}}}, + {"plan":{"collaborators":{"collaborator":{"_eq":"X-Hasura-User-Id"}}}}, + {"mission_model":{"plans":{"collaborators":{"collaborator":{"_eq":"X-Hasura-User-Id"}}}}}, + {"mission_model":{"plans":{"owner":{"_eq":"X-Hasura-User-Id"}}}}]}