From 04659132b72beb714b51e87212c8e6b787c9f894 Mon Sep 17 00:00:00 2001 From: Sriharsha Chintalapani Date: Fri, 22 Nov 2024 10:41:42 -0800 Subject: [PATCH] Minor: skip domain check for bots and admin (#18734) --- .../service/security/policyevaluator/PolicyEvaluator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/security/policyevaluator/PolicyEvaluator.java b/openmetadata-service/src/main/java/org/openmetadata/service/security/policyevaluator/PolicyEvaluator.java index ae45e5ae613..fe618cd08f0 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/security/policyevaluator/PolicyEvaluator.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/security/policyevaluator/PolicyEvaluator.java @@ -84,7 +84,9 @@ public class PolicyEvaluator { @NonNull ResourceContextInterface resourceContext, OperationContext operationContext) { // If the Resource Does not belong to any Domain, then evaluate via other permissions - if (!nullOrEmpty(resourceContext.getDomain())) { + if (!nullOrEmpty(resourceContext.getDomain()) + && !subjectContext.isAdmin() + && !subjectContext.isBot()) { EntityReference domain = resourceContext.getDomain(); if (!subjectContext.hasDomain(domain)) { throw new AuthorizationException(