/** * Check if identity is allowed to rename the specified table in a catalog. * * @throws AccessDeniedException if not allowed */ default void checkCanRenameTable(Identity identity, CatalogSchemaTableName table, CatalogSchemaTableName newTable) { denyRenameTable(table.toString(), newTable.toString()); }
/** * Check if identity is allowed to add columns to the specified table in a catalog. * * @throws AccessDeniedException if not allowed */ default void checkCanAddColumn(Identity identity, CatalogSchemaTableName table) { denyAddColumn(table.toString()); }
/** * Check if identity is allowed to drop the specified table in a catalog. * * @throws AccessDeniedException if not allowed */ default void checkCanDropTable(Identity identity, CatalogSchemaTableName table) { denyDropTable(table.toString()); }
/** * Check if identity is allowed to select from the specified columns in a relation. The column set can be empty. * * @throws AccessDeniedException if not allowed */ default void checkCanSelectFromColumns(Identity identity, CatalogSchemaTableName table, Set<String> columns) { denySelectColumns(table.toString(), columns); }
/** * Check if identity is allowed to create the specified table in a catalog. * * @throws AccessDeniedException if not allowed */ default void checkCanCreateTable(Identity identity, CatalogSchemaTableName table) { denyCreateTable(table.toString()); }
/** * Check if identity is allowed to create a view that selects from the specified columns in a relation. * * @throws AccessDeniedException if not allowed */ default void checkCanCreateViewWithSelectFromColumns(Identity identity, CatalogSchemaTableName table, Set<String> columns) { denyCreateViewWithSelect(table.toString(), identity); }
/** * Check if identity is allowed to rename a column in the specified table in a catalog. * * @throws AccessDeniedException if not allowed */ default void checkCanRenameColumn(Identity identity, CatalogSchemaTableName table) { denyRenameColumn(table.toString()); }
/** * Check if identity is allowed to insert into the specified table in a catalog. * * @throws AccessDeniedException if not allowed */ default void checkCanInsertIntoTable(Identity identity, CatalogSchemaTableName table) { denyInsertTable(table.toString()); }
/** * Check if identity is allowed to drop the specified view in a catalog. * * @throws AccessDeniedException if not allowed */ default void checkCanDropView(Identity identity, CatalogSchemaTableName view) { denyDropView(view.toString()); }
/** * Check if identity is allowed to drop columns from the specified table in a catalog. * * @throws AccessDeniedException if not allowed */ default void checkCanDropColumn(Identity identity, CatalogSchemaTableName table) { denyDropColumn(table.toString()); }
/** * Check if identity is allowed to delete from the specified table in a catalog. * * @throws AccessDeniedException if not allowed */ default void checkCanDeleteFromTable(Identity identity, CatalogSchemaTableName table) { denyDeleteTable(table.toString()); }
/** * Check if identity is allowed to create the specified view in a catalog. * * @throws AccessDeniedException if not allowed */ default void checkCanCreateView(Identity identity, CatalogSchemaTableName view) { denyCreateView(view.toString()); }
/** * Check if identity is allowed to grant the specified privilege to the grantee on the specified table. * * @throws AccessDeniedException if not allowed */ default void checkCanGrantTablePrivilege(Identity identity, Privilege privilege, CatalogSchemaTableName table, PrestoPrincipal grantee, boolean withGrantOption) { denyGrantTablePrivilege(privilege.toString(), table.toString()); }
/** * Check if identity is allowed to revoke the specified privilege on the specified table from the revokee. * * @throws AccessDeniedException if not allowed */ default void checkCanRevokeTablePrivilege(Identity identity, Privilege privilege, CatalogSchemaTableName table, PrestoPrincipal revokee, boolean grantOptionFor) { denyRevokeTablePrivilege(privilege.toString(), table.toString()); }
@Override public void checkCanSelectFromColumns(Identity identity, CatalogSchemaTableName table, Set<String> columns) { if (table.getCatalogName().equals("secured_catalog")) { denySelectTable(table.toString()); } }
@Override public void checkCanSelectFromColumns(Identity identity, CatalogSchemaTableName table, Set<String> columns) { if (table.getCatalogName().equals("secured_catalog")) { denySelectTable(table.toString()); } }