Fix #7319: For non admin users with ViewAll or ViewTests permissions testCaseResource listing with testSuiteID is returning null (#7320)

This commit is contained in:
Sriharsha Chintalapani 2022-09-07 17:30:48 -07:00 committed by GitHub
parent fc7510ff36
commit 1d56705f5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,6 +97,7 @@ public class TestCaseResourceContext implements ResourceContextInterface {
}
private static EntityInterface resolveEntityByName(String fqn) throws IOException {
if (fqn == null) return null;
EntityRepository<TestCase> dao = Entity.getEntityRepository(Entity.TEST_CASE);
TestCase testCase = dao.getByName(null, fqn, dao.getFields("entityLink"), Include.ALL);
return resolveEntityByEntityLink(EntityLink.parse(testCase.getEntityLink()));