From 1d56705f5b58dd6e55b05a3482fa39c30f95885a Mon Sep 17 00:00:00 2001 From: Sriharsha Chintalapani Date: Wed, 7 Sep 2022 17:30:48 -0700 Subject: [PATCH] Fix #7319: For non admin users with ViewAll or ViewTests permissions testCaseResource listing with testSuiteID is returning null (#7320) --- .../security/policyevaluator/TestCaseResourceContext.java | 1 + 1 file changed, 1 insertion(+) diff --git a/catalog-rest-service/src/main/java/org/openmetadata/catalog/security/policyevaluator/TestCaseResourceContext.java b/catalog-rest-service/src/main/java/org/openmetadata/catalog/security/policyevaluator/TestCaseResourceContext.java index 8870da58622..de9e2e799c3 100644 --- a/catalog-rest-service/src/main/java/org/openmetadata/catalog/security/policyevaluator/TestCaseResourceContext.java +++ b/catalog-rest-service/src/main/java/org/openmetadata/catalog/security/policyevaluator/TestCaseResourceContext.java @@ -97,6 +97,7 @@ public class TestCaseResourceContext implements ResourceContextInterface { } private static EntityInterface resolveEntityByName(String fqn) throws IOException { + if (fqn == null) return null; EntityRepository dao = Entity.getEntityRepository(Entity.TEST_CASE); TestCase testCase = dao.getByName(null, fqn, dao.getFields("entityLink"), Include.ALL); return resolveEntityByEntityLink(EntityLink.parse(testCase.getEntityLink()));