diff --git a/core/trino-main/src/main/java/io/trino/server/security/ResourceAccessType.java b/core/trino-main/src/main/java/io/trino/server/security/ResourceAccessType.java index 9fe79418b358..b71a2d0b9e03 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/ResourceAccessType.java +++ b/core/trino-main/src/main/java/io/trino/server/security/ResourceAccessType.java @@ -49,7 +49,6 @@ public AccessType getAccessType(ResourceInfo resourceInfo) // check if the resource class has an access type declared for all methods accessType = resourceAccessTypeLoader.getAccessType(resourceInfo.getResourceClass()); if (accessType.isPresent()) { - verifyNotTrinoResource(resourceInfo); return accessType.get(); } // in some cases there the resource is a nested class, so check the parent class @@ -57,7 +56,6 @@ public AccessType getAccessType(ResourceInfo resourceInfo) if (resourceInfo.getResourceClass().getDeclaringClass() != null) { accessType = resourceAccessTypeLoader.getAccessType(resourceInfo.getResourceClass().getDeclaringClass()); if (accessType.isPresent()) { - verifyNotTrinoResource(resourceInfo); return accessType.get(); } }