public static void denyGrantTablePrivilege(String privilege, String tableName) { denyGrantTablePrivilege(privilege, tableName, null); }
@Override public void checkCanGrantTablePrivilege(ConnectorTransactionHandle transaction, Identity identity, Privilege privilege, SchemaTableName tableName, String grantee, boolean withGrantOption) { denyGrantTablePrivilege(privilege.name(), tableName.toString()); }
/** * Check if identity is allowed to grant to any other user the specified privilege on the specified table. * * @throws com.facebook.presto.spi.security.AccessDeniedException if not allowed */ default void checkCanGrantTablePrivilege(ConnectorTransactionHandle transactionHandle, Identity identity, Privilege privilege, SchemaTableName tableName, String grantee, boolean withGrantOption) { denyGrantTablePrivilege(privilege.toString(), tableName.toString()); }
@Override public void checkCanGrantTablePrivilege(TransactionId transactionId, Identity identity, Privilege privilege, QualifiedObjectName tableName, String grantee, boolean withGrantOption) { denyGrantTablePrivilege(privilege.name(), tableName.toString()); }
/** * Check if identity is allowed to grant the specified privilege to the grantee on the specified table. * * @throws com.facebook.presto.spi.security.AccessDeniedException if not allowed */ default void checkCanGrantTablePrivilege(Identity identity, Privilege privilege, CatalogSchemaTableName table, String grantee, boolean withGrantOption) { denyGrantTablePrivilege(privilege.toString(), table.toString()); }
@Override public void checkCanGrantTablePrivilege(ConnectorTransactionHandle transaction, Identity identity, Privilege privilege, SchemaTableName tableName, String grantee, boolean withGrantOption) { if (!checkTablePermission(identity, tableName, OWNERSHIP)) { denyGrantTablePrivilege(privilege.name(), tableName.toString()); } }
@Override public void checkCanGrantTablePrivilege(ConnectorTransactionHandle transaction, Identity identity, Privilege privilege, SchemaTableName tableName, String grantee, boolean withGrantOption) { if (checkTablePermission(transaction, identity, tableName, OWNERSHIP)) { return; } HivePrivilege hivePrivilege = toHivePrivilege(privilege); if (hivePrivilege == null || !getGrantOptionForPrivilege(transaction, identity, privilege, tableName)) { denyGrantTablePrivilege(privilege.name(), tableName.toString()); } }
public static void denyGrantTablePrivilege(String privilege, String tableName) { denyGrantTablePrivilege(privilege, tableName, null); }
/** * Check if identity is allowed to grant the specified privilege to the grantee on the specified table. * * @throws com.facebook.presto.spi.security.AccessDeniedException if not allowed */ default void checkCanGrantTablePrivilege(Identity identity, Privilege privilege, CatalogSchemaTableName table, String grantee, boolean withGrantOption) { denyGrantTablePrivilege(privilege.toString(), table.toString()); }
@Override public void checkCanGrantTablePrivilege(Identity identity, Privilege privilege, SchemaTableName tableName) { denyGrantTablePrivilege(privilege.name(), tableName.toString()); } }
/** * Check if identity is allowed to grant to any other user the specified privilege on the specified table. * * @throws com.facebook.presto.spi.security.AccessDeniedException if not allowed */ default void checkCanGrantTablePrivilege(ConnectorTransactionHandle transactionHandle, Identity identity, Privilege privilege, SchemaTableName tableName, String grantee, boolean withGrantOption) { denyGrantTablePrivilege(privilege.toString(), tableName.toString()); }
@Override public void checkCanGrantTablePrivilege(Identity identity, Privilege privilege, QualifiedObjectName tableName) { denyGrantTablePrivilege(privilege.name(), tableName.toString()); }
@Override public void checkCanGrantTablePrivilege(Identity identity, Privilege privilege, SchemaTableName tableName) { if (checkTablePermission(identity, tableName, OWNERSHIP)) { return; } HivePrivilege hivePrivilege = toHivePrivilege(privilege); if (hivePrivilege == null || !metastore.hasPrivilegeWithGrantOptionOnTable(identity.getUser(), tableName.getSchemaName(), tableName.getTableName(), hivePrivilege)) { denyGrantTablePrivilege(privilege.name(), tableName.toString()); } }