public static void denyCreateViewWithSelect(String sourceName, Identity identity) { denyCreateViewWithSelect(sourceName, identity, null); }
@Override public void checkCanCreateViewWithSelectFromColumns(TransactionId transactionId, Identity identity, QualifiedObjectName tableName, Set<String> columnNames) { denyCreateViewWithSelect(tableName.toString(), identity); }
/** * Check if identity is allowed to create a view that selects from the specified columns in a relation. * * @throws com.facebook.presto.spi.security.AccessDeniedException if not allowed */ default void checkCanCreateViewWithSelectFromColumns(ConnectorTransactionHandle transactionHandle, Identity identity, SchemaTableName tableName, Set<String> columnNames) { denyCreateViewWithSelect(tableName.toString(), identity); }
/** * Check if identity is allowed to create a view that selects from the specified columns in a relation. * * @throws com.facebook.presto.spi.security.AccessDeniedException if not allowed */ default void checkCanCreateViewWithSelectFromColumns(Identity identity, CatalogSchemaTableName table, Set<String> columns) { denyCreateViewWithSelect(table.toString(), identity); }
@Override public void checkCanCreateViewWithSelectFromColumns(TransactionId transactionId, Identity identity, QualifiedObjectName tableName, Set<String> columnNames) { if (shouldDenyPrivilege(identity.getUser(), tableName.getObjectName(), CREATE_VIEW_WITH_SELECT_COLUMNS)) { denyCreateViewWithSelect(tableName.toString(), identity); } if (denyPrivileges.isEmpty()) { super.checkCanCreateViewWithSelectFromColumns(transactionId, identity, tableName, columnNames); } }
@Override public void checkCanCreateViewWithSelectFromColumns(ConnectorTransactionHandle transaction, Identity identity, SchemaTableName tableName, Set<String> columnNames) { // TODO implement column level access control if (!checkTablePermission(transaction, identity, tableName, SELECT)) { denySelectTable(tableName.toString()); } if (!getGrantOptionForPrivilege(transaction, identity, Privilege.SELECT, tableName)) { denyCreateViewWithSelect(tableName.toString(), identity); } }
@Override public void checkCanCreateViewWithSelectFromColumns(ConnectorTransactionHandle transactionHandle, Identity identity, SchemaTableName tableName, Set<String> columnNames) { // TODO: implement column level permissions if (!checkTablePermission(identity, tableName, SELECT)) { denySelectTable(tableName.toString()); } if (!checkTablePermission(identity, tableName, GRANT_SELECT)) { denyCreateViewWithSelect(tableName.toString(), identity); } }
public static void denyCreateViewWithSelect(String sourceName, Identity identity) { denyCreateViewWithSelect(sourceName, identity, null); }
/** * Check if identity is allowed to create a view that selects from the specified columns in a relation. * * @throws com.facebook.presto.spi.security.AccessDeniedException if not allowed */ default void checkCanCreateViewWithSelectFromColumns(ConnectorTransactionHandle transactionHandle, Identity identity, SchemaTableName tableName, Set<String> columnNames) { denyCreateViewWithSelect(tableName.toString(), identity); }
/** * Check if identity is allowed to create a view that selects from the specified columns in a relation. * * @throws com.facebook.presto.spi.security.AccessDeniedException if not allowed */ default void checkCanCreateViewWithSelectFromColumns(Identity identity, CatalogSchemaTableName table, Set<String> columns) { denyCreateViewWithSelect(table.toString(), identity); }