use of io.trino.plugin.base.security.AllowAllAccessControl in project trino by trinodb.
the class TestAccessControlManager method testAllowExecuteProcedure.
@Test
public void testAllowExecuteProcedure() {
try (LocalQueryRunner queryRunner = LocalQueryRunner.create(TEST_SESSION)) {
TransactionManager transactionManager = queryRunner.getTransactionManager();
AccessControlManager accessControlManager = createAccessControlManager(transactionManager);
accessControlManager.setSystemAccessControl("allow-all", ImmutableMap.of());
queryRunner.createCatalog("connector", MockConnectorFactory.create(), ImmutableMap.of());
accessControlManager.addCatalogAccessControl(new CatalogName("connector"), new AllowAllAccessControl());
transaction(transactionManager, accessControlManager).execute(transactionId -> {
accessControlManager.checkCanExecuteProcedure(context(transactionId), new QualifiedObjectName("connector", "schema", "procedure"));
});
}
}
Aggregations