Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
jerqi committed Oct 30, 2024
1 parent 442bdb9 commit d9b9ed0
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ private static void callAuthorizationPluginImpl(
}
}

public static void removeAuthorizationPluginPrivileges(
public static void authorizationPluginRemovePrivileges(
NameIdentifier ident, Entity.EntityType type) {
// If we enable authorization, we should remove the privileges about the entity in the
// authorization plugin.
Expand All @@ -288,7 +288,7 @@ public static void removeAuthorizationPluginPrivileges(
}
}

public static void renameAuthorizationPluginPrivileges(
public static void authorizationPluginRenamePrivileges(
NameIdentifier ident, Entity.EntityType type, String newName) {
// If we enable authorization, we should rename the privileges about the entity in the
// authorization plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,22 +112,22 @@ public Catalog alterCatalog(NameIdentifier ident, CatalogChange... changes)
}
}
if (lastRenameChange != null) {
AuthorizationUtils.renameAuthorizationPluginPrivileges(
AuthorizationUtils.authorizationPluginRenamePrivileges(
ident, Entity.EntityType.CATALOG, lastRenameChange.getNewName());
}
return alteredCatalog;
}

@Override
public boolean dropCatalog(NameIdentifier ident) {
AuthorizationUtils.removeAuthorizationPluginPrivileges(ident, Entity.EntityType.CATALOG);
AuthorizationUtils.authorizationPluginRemovePrivileges(ident, Entity.EntityType.CATALOG);
return dispatcher.dropCatalog(ident);
}

@Override
public boolean dropCatalog(NameIdentifier ident, boolean force)
throws NonEmptyEntityException, CatalogInUseException {
AuthorizationUtils.removeAuthorizationPluginPrivileges(ident, Entity.EntityType.CATALOG);
AuthorizationUtils.authorizationPluginRemovePrivileges(ident, Entity.EntityType.CATALOG);
return dispatcher.dropCatalog(ident, force);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public Fileset alterFileset(NameIdentifier ident, FilesetChange... changes)
}
}
if (lastRenameChange != null) {
AuthorizationUtils.renameAuthorizationPluginPrivileges(
AuthorizationUtils.authorizationPluginRenamePrivileges(
ident, Entity.EntityType.FILESET, lastRenameChange.getNewName());
}

Expand All @@ -104,7 +104,7 @@ public Fileset alterFileset(NameIdentifier ident, FilesetChange... changes)
@Override
public boolean dropFileset(NameIdentifier ident) {
boolean dropped = dispatcher.dropFileset(ident);
AuthorizationUtils.removeAuthorizationPluginPrivileges(ident, Entity.EntityType.FILESET);
AuthorizationUtils.authorizationPluginRemovePrivileges(ident, Entity.EntityType.FILESET);
return dropped;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public Schema alterSchema(NameIdentifier ident, SchemaChange... changes)
@Override
public boolean dropSchema(NameIdentifier ident, boolean cascade) throws NonEmptySchemaException {
boolean dropped = dispatcher.dropSchema(ident, cascade);
AuthorizationUtils.removeAuthorizationPluginPrivileges(ident, Entity.EntityType.SCHEMA);
AuthorizationUtils.authorizationPluginRemovePrivileges(ident, Entity.EntityType.SCHEMA);
return dropped;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public Table alterTable(NameIdentifier ident, TableChange... changes)
}

if (lastRenameChange != null) {
AuthorizationUtils.renameAuthorizationPluginPrivileges(
AuthorizationUtils.authorizationPluginRenamePrivileges(
ident, Entity.EntityType.TABLE, lastRenameChange.getNewName());
}

Expand All @@ -116,14 +116,14 @@ public Table alterTable(NameIdentifier ident, TableChange... changes)
@Override
public boolean dropTable(NameIdentifier ident) {
boolean dropped = dispatcher.dropTable(ident);
AuthorizationUtils.removeAuthorizationPluginPrivileges(ident, Entity.EntityType.TABLE);
AuthorizationUtils.authorizationPluginRemovePrivileges(ident, Entity.EntityType.TABLE);
return dropped;
}

@Override
public boolean purgeTable(NameIdentifier ident) throws UnsupportedOperationException {
boolean purged = dispatcher.purgeTable(ident);
AuthorizationUtils.removeAuthorizationPluginPrivileges(ident, Entity.EntityType.TABLE);
AuthorizationUtils.authorizationPluginRemovePrivileges(ident, Entity.EntityType.TABLE);
return purged;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public Topic alterTopic(NameIdentifier ident, TopicChange... changes)
@Override
public boolean dropTopic(NameIdentifier ident) {
boolean dropped = dispatcher.dropTopic(ident);
AuthorizationUtils.removeAuthorizationPluginPrivileges(ident, Entity.EntityType.TOPIC);
AuthorizationUtils.authorizationPluginRemovePrivileges(ident, Entity.EntityType.TOPIC);
return dropped;
}

Expand Down

0 comments on commit d9b9ed0

Please sign in to comment.