From a201c049917e3a79cec8df2176126ae94c74e2e1 Mon Sep 17 00:00:00 2001 From: Anshul Mehta Date: Mon, 18 Dec 2023 18:05:52 +0530 Subject: [PATCH] policies to add/remove relationship to domain/product --- .../policy_cache_transformer_persona.json | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/addons/static/templates/policy_cache_transformer_persona.json b/addons/static/templates/policy_cache_transformer_persona.json index 7ba930c2f1..a1d17b247d 100644 --- a/addons/static/templates/policy_cache_transformer_persona.json +++ b/addons/static/templates/policy_cache_transformer_persona.json @@ -438,6 +438,23 @@ "end-two-entity:{entity}/*" ], "actions": ["add-relationship", "update-relationship", "remove-relationship"] + }, + { + "policyResourceCategory": "RELATIONSHIP", + "policyType": "ACCESS", + "description": "Link/unlink resource to this Domain", + "resources": [ + "relationship-type:*", + + "end-one-entity-type:DataDomain", + "end-one-entity-classification:*", + "end-one-entity:{entity}", + + "end-two-entity-type:Resource", + "end-two-entity-classification:*", + "end-two-entity:*" + ], + "actions": ["add-relationship", "update-relationship", "remove-relationship"] } ], @@ -495,6 +512,23 @@ "entity-classification:*" ], "actions": ["entity-update"] + }, + { + "policyResourceCategory": "RELATIONSHIP", + "policyType": "ACCESS", + "description": "Link/unlink resource to this Sub Domain", + "resources": [ + "relationship-type:*", + + "end-one-entity-type:DataDomain", + "end-one-entity-classification:*", + "end-one-entity:{entity}/*domain/*", + + "end-two-entity-type:Resource", + "end-two-entity-classification:*", + "end-two-entity:*" + ], + "actions": ["add-relationship", "update-relationship", "remove-relationship"] } ], "persona-domain-sub-domain-delete": [ @@ -599,6 +633,25 @@ "end-two-entity:{entity}/*product/*" ], + "actions": ["add-relationship", "update-relationship", "remove-relationship"] + }, + { + "policyResourceCategory": "RELATIONSHIP", + "policyType": "ACCESS", + "description": "Link/unlink any Asset to this DataProduct", + + "resources": [ + "relationship-type:*", + + "end-one-entity-type:DataProduct", + "end-one-entity-classification:*", + "end-one-entity:{entity}/*product/*", + + "end-two-entity-type:Asset", + "end-two-entity-classification:*", + "end-two-entity:*" + ], + "actions": ["add-relationship", "update-relationship", "remove-relationship"] } ],