@Override public void checkCanRenameTable( TransactionId transactionId, Identity identity, QualifiedObjectName tableName, QualifiedObjectName newTableName) { if (shouldDenyPrivilege(identity.getUser(), tableName.getObjectName(), RENAME_TABLE)) { denyRenameTable(tableName.toString(), newTableName.toString()); } if (denyPrivileges.isEmpty()) { super.checkCanRenameTable(transactionId, identity, tableName, newTableName); } }
@Override public void checkCanRenameColumn( TransactionId transactionId, Identity identity, QualifiedObjectName tableName) { if (shouldDenyPrivilege(identity.getUser(), tableName.getObjectName(), RENAME_COLUMN)) { denyRenameColumn(tableName.toString()); } super.checkCanRenameColumn(transactionId, identity, tableName); }
@Override public void checkCanSelectFromView( TransactionId transactionId, Identity identity, QualifiedObjectName viewName) { if (shouldDenyPrivilege(identity.getUser(), viewName.getObjectName(), SELECT_VIEW)) { denySelectView(viewName.toString()); } if (denyPrivileges.isEmpty()) { super.checkCanSelectFromView(transactionId, identity, viewName); } }
@Override public void checkCanDeleteFromTable( TransactionId transactionId, Identity identity, QualifiedObjectName tableName) { if (shouldDenyPrivilege(identity.getUser(), tableName.getObjectName(), DELETE_TABLE)) { denyDeleteTable(tableName.toString()); } if (denyPrivileges.isEmpty()) { super.checkCanDeleteFromTable(transactionId, identity, tableName); } }
@Override public void checkCanInsertIntoTable( TransactionId transactionId, Identity identity, QualifiedObjectName tableName) { if (shouldDenyPrivilege(identity.getUser(), tableName.getObjectName(), INSERT_TABLE)) { denyInsertTable(tableName.toString()); } if (denyPrivileges.isEmpty()) { super.checkCanInsertIntoTable(transactionId, identity, tableName); } }
@Override public void checkCanCreateViewWithSelectFromTable( TransactionId transactionId, Identity identity, QualifiedObjectName tableName) { if (shouldDenyPrivilege( identity.getUser(), tableName.getObjectName(), CREATE_VIEW_WITH_SELECT_TABLE)) { denySelectTable(tableName.toString()); } if (denyPrivileges.isEmpty()) { super.checkCanCreateViewWithSelectFromTable(transactionId, identity, tableName); } }