From f2eb4a6e352d2e1d8697c34062786e9552eb9afe Mon Sep 17 00:00:00 2001 From: Anshul Mehta Date: Mon, 18 Dec 2023 21:58:16 +0530 Subject: [PATCH] fix data mesh terms policy --- .../policy_cache_transformer_persona.json | 55 ++++++++++++++++++- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/addons/static/templates/policy_cache_transformer_persona.json b/addons/static/templates/policy_cache_transformer_persona.json index a1d17b247d..ebb9348858 100644 --- a/addons/static/templates/policy_cache_transformer_persona.json +++ b/addons/static/templates/policy_cache_transformer_persona.json @@ -396,7 +396,12 @@ "entity-type:DataDomain", "entity-classification:*" ], - "actions": ["entity-update"] + "actions": [ + "entity-update", + "entity-add-classification", + "entity-update-classification", + "entity-remove-classification" + ] }, { "policyResourceCategory": "RELATIONSHIP", @@ -455,6 +460,23 @@ "end-two-entity:*" ], "actions": ["add-relationship", "update-relationship", "remove-relationship"] + }, + { + "policyResourceCategory": "RELATIONSHIP", + "policyType": "ACCESS", + "description": "Link/unlink term to this Sub Domain", + "resources": [ + "relationship-type:*", + + "end-one-entity-type:AtlasGlossaryTerm", + "end-one-entity-classification:*", + "end-one-entity:*", + + "end-two-entity-type:DataDomain", + "end-two-entity-classification:*", + "end-two-entity:{entity}" + ], + "actions": ["add-relationship", "update-relationship", "remove-relationship"] } ], @@ -511,7 +533,12 @@ "entity-type:DataDomain", "entity-classification:*" ], - "actions": ["entity-update"] + "actions": [ + "entity-update", + "entity-add-classification", + "entity-update-classification", + "entity-remove-classification" + ] }, { "policyResourceCategory": "RELATIONSHIP", @@ -529,6 +556,23 @@ "end-two-entity:*" ], "actions": ["add-relationship", "update-relationship", "remove-relationship"] + }, + { + "policyResourceCategory": "RELATIONSHIP", + "policyType": "ACCESS", + "description": "Link/unlink term to this Sub Domain", + "resources": [ + "relationship-type:*", + + "end-one-entity-type:AtlasGlossaryTerm", + "end-one-entity-classification:*", + "end-one-entity:*", + + "end-two-entity-type:DataDomain", + "end-two-entity-classification:*", + "end-two-entity:{entity}/*domain/*" + ], + "actions": ["add-relationship", "update-relationship", "remove-relationship"] } ], "persona-domain-sub-domain-delete": [ @@ -614,7 +658,12 @@ "entity-type:DataProduct", "entity-classification:*" ], - "actions": ["entity-update"] + "actions": [ + "entity-update", + "entity-add-classification", + "entity-update-classification", + "entity-remove-classification" + ] }, { "policyResourceCategory": "RELATIONSHIP",