Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -518,10 +518,8 @@ private PolarisResolutionManifest authorizeGrantOnTableLikeOperationOrThrow(
resolutionManifest.getResolvedPath(
identifier, PolarisEntityType.TABLE_LIKE, PolarisEntitySubType.ANY_SUBTYPE, true);
boolean rbacForFederatedCatalogsEnabled =
getCurrentPolarisContext()
.getRealmConfig()
.getConfig(
FeatureConfiguration.ENABLE_SUB_CATALOG_RBAC_FOR_FEDERATED_CATALOGS, catalogEntity);
realmConfig.getConfig(
FeatureConfiguration.ENABLE_SUB_CATALOG_RBAC_FOR_FEDERATED_CATALOGS, catalogEntity);
if (!(resolutionManifest.getIsPassthroughFacade() && rbacForFederatedCatalogsEnabled)
&& !subTypes.contains(tableLikeWrapper.getRawLeafEntity().getSubType())) {
CatalogHandler.throwNotFoundExceptionForTableLikeEntity(identifier, subTypes);
Expand Down Expand Up @@ -1698,11 +1696,8 @@ public PrivilegeResult grantPrivilegeOnNamespaceToRole(
if (resolvedPathWrapper == null
|| !resolvedPathWrapper.isFullyResolvedNamespace(catalogName, namespace)) {
boolean rbacForFederatedCatalogsEnabled =
getCurrentPolarisContext()
.getRealmConfig()
.getConfig(
FeatureConfiguration.ENABLE_SUB_CATALOG_RBAC_FOR_FEDERATED_CATALOGS,
catalogEntity);
realmConfig.getConfig(
FeatureConfiguration.ENABLE_SUB_CATALOG_RBAC_FOR_FEDERATED_CATALOGS, catalogEntity);
if (resolutionManifest.getIsPassthroughFacade() && rbacForFederatedCatalogsEnabled) {
resolvedPathWrapper =
createSyntheticNamespaceEntities(
Expand Down Expand Up @@ -2140,11 +2135,8 @@ private PrivilegeResult grantPrivilegeOnTableLikeToRole(
if (resolvedPathWrapper == null
|| !subTypes.contains(resolvedPathWrapper.getRawLeafEntity().getSubType())) {
boolean rbacForFederatedCatalogsEnabled =
getCurrentPolarisContext()
.getRealmConfig()
.getConfig(
FeatureConfiguration.ENABLE_SUB_CATALOG_RBAC_FOR_FEDERATED_CATALOGS,
catalogEntity);
realmConfig.getConfig(
FeatureConfiguration.ENABLE_SUB_CATALOG_RBAC_FOR_FEDERATED_CATALOGS, catalogEntity);
if (resolutionManifest.getIsPassthroughFacade() && rbacForFederatedCatalogsEnabled) {
resolvedPathWrapper =
createSyntheticTableLikeEntities(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected void initializeCatalog() {
.addKeyValue("remoteUrl", connectionConfigInfoDpo.getUri())
.log("Initializing federated catalog");
FeatureConfiguration.enforceFeatureEnabledOrThrow(
callContext.getRealmConfig(), FeatureConfiguration.ENABLE_CATALOG_FEDERATION);
realmConfig, FeatureConfiguration.ENABLE_CATALOG_FEDERATION);

GenericTableCatalog federatedCatalog;
ConnectionType connectionType =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -806,9 +806,7 @@ protected ViewOperations newViewOps(TableIdentifier identifier) {
@Override
public boolean dropView(TableIdentifier identifier) {
boolean purge =
callContext
.getRealmConfig()
.getConfig(FeatureConfiguration.PURGE_VIEW_METADATA_ON_DROP, catalogEntity);
realmConfig.getConfig(FeatureConfiguration.PURGE_VIEW_METADATA_ON_DROP, catalogEntity);

return dropTableLike(PolarisEntitySubType.ICEBERG_VIEW, identifier, Map.of(), purge)
.isSuccess();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public class PolarisAdminServiceTest {
void setUp() throws Exception {
MockitoAnnotations.openMocks(this);
when(callContext.getPolarisCallContext()).thenReturn(polarisCallContext);
when(polarisCallContext.getRealmConfig()).thenReturn(realmConfig);
when(callContext.getRealmConfig()).thenReturn(realmConfig);

// Default feature configuration - enabled by default
when(realmConfig.getConfig(FeatureConfiguration.ENABLE_SUB_CATALOG_RBAC_FOR_FEDERATED_CATALOGS))
Expand Down