public static void denyRevokeTablePrivilege(String privilege, String tableName) { denyRevokeTablePrivilege(privilege, tableName, null); }
@Override public void checkCanRevokeTablePrivilege(TransactionId transactionId, Identity identity, Privilege privilege, QualifiedObjectName tableName, String revokee, boolean grantOptionFor) { denyRevokeTablePrivilege(privilege.name(), tableName.toString()); }
/** * Check if identity is allowed to revoke the specified privilege on the specified table from the revokee. * * @throws com.facebook.presto.spi.security.AccessDeniedException if not allowed */ default void checkCanRevokeTablePrivilege(Identity identity, Privilege privilege, CatalogSchemaTableName table, String revokee, boolean grantOptionFor) { denyRevokeTablePrivilege(privilege.toString(), table.toString()); } }
@Override public void checkCanRevokeTablePrivilege(ConnectorTransactionHandle transaction, Identity identity, Privilege privilege, SchemaTableName tableName, String revokee, boolean grantOptionFor) { denyRevokeTablePrivilege(privilege.name(), tableName.toString()); } }
/** * Check if identity is allowed to revoke the specified privilege on the specified table from any user. * * @throws com.facebook.presto.spi.security.AccessDeniedException if not allowed */ default void checkCanRevokeTablePrivilege(ConnectorTransactionHandle transactionHandle, Identity identity, Privilege privilege, SchemaTableName tableName, String revokee, boolean grantOptionFor) { denyRevokeTablePrivilege(privilege.toString(), tableName.toString()); } }
@Override public void checkCanRevokeTablePrivilege(ConnectorTransactionHandle transaction, Identity identity, Privilege privilege, SchemaTableName tableName, String revokee, boolean grantOptionFor) { if (!checkTablePermission(identity, tableName, OWNERSHIP)) { denyRevokeTablePrivilege(privilege.name(), tableName.toString()); } }
@Override public void checkCanRevokeTablePrivilege(ConnectorTransactionHandle transaction, Identity identity, Privilege privilege, SchemaTableName tableName, String revokee, boolean grantOptionFor) { if (checkTablePermission(transaction, identity, tableName, OWNERSHIP)) { return; } HivePrivilege hivePrivilege = toHivePrivilege(privilege); if (hivePrivilege == null || !getGrantOptionForPrivilege(transaction, identity, privilege, tableName)) { denyRevokeTablePrivilege(privilege.name(), tableName.toString()); } }
public static void denyRevokeTablePrivilege(String privilege, String tableName) { denyRevokeTablePrivilege(privilege, tableName, null); }
/** * Check if identity is allowed to revoke the specified privilege on the specified table from any user. * * @throws com.facebook.presto.spi.security.AccessDeniedException if not allowed */ default void checkCanRevokeTablePrivilege(ConnectorTransactionHandle transactionHandle, Identity identity, Privilege privilege, SchemaTableName tableName, String revokee, boolean grantOptionFor) { denyRevokeTablePrivilege(privilege.toString(), tableName.toString()); } }
/** * Check if identity is allowed to revoke the specified privilege on the specified table from the revokee. * * @throws com.facebook.presto.spi.security.AccessDeniedException if not allowed */ default void checkCanRevokeTablePrivilege(Identity identity, Privilege privilege, CatalogSchemaTableName table, String revokee, boolean grantOptionFor) { denyRevokeTablePrivilege(privilege.toString(), table.toString()); } }