Skip to content

Commit 35dbe27

Browse files
committed
better naming
1 parent d30d91d commit 35dbe27

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

service/common/src/main/java/org/apache/polaris/service/catalog/policy/PolicyCatalogHandler.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ public boolean dropPolicy(PolicyIdentifier identifier, boolean detachAll) {
125125
}
126126

127127
public boolean attachPolicy(PolicyIdentifier identifier, AttachPolicyRequest request) {
128-
authorizePolicyAttachmentOperationOrThrow(identifier, request.getTarget(), true);
128+
authorizePolicyMappingOperationOrThrow(identifier, request.getTarget(), true);
129129
return policyCatalog.attachPolicy(identifier, request.getTarget(), request.getParameters());
130130
}
131131

132132
public boolean detachPolicy(PolicyIdentifier identifier, DetachPolicyRequest request) {
133-
authorizePolicyAttachmentOperationOrThrow(identifier, request.getTarget(), false);
133+
authorizePolicyMappingOperationOrThrow(identifier, request.getTarget(), false);
134134
return policyCatalog.detachPolicy(identifier, request.getTarget());
135135
}
136136

@@ -161,7 +161,7 @@ private void authorizeBasicPolicyOperationOrThrow(
161161
initializeCatalog();
162162
}
163163

164-
private void authorizePolicyAttachmentOperationOrThrow(
164+
private void authorizePolicyMappingOperationOrThrow(
165165
PolicyIdentifier identifier, PolicyAttachmentTarget target, boolean isAttach) {
166166
resolutionManifest =
167167
entityManager.prepareResolutionManifest(callContext, securityContext, catalogName);
@@ -207,7 +207,7 @@ private void authorizePolicyAttachmentOperationOrThrow(
207207
PolicyCatalogUtils.getResolvedPathWrapper(resolutionManifest, target);
208208

209209
PolarisAuthorizableOperation op =
210-
determinePolicyAttachmentOperation(target, targetWrapper, isAttach);
210+
determinePolicyMappingOperation(target, targetWrapper, isAttach);
211211

212212
authorizer.authorizeOrThrow(
213213
authenticatedPrincipal,
@@ -219,7 +219,7 @@ private void authorizePolicyAttachmentOperationOrThrow(
219219
initializeCatalog();
220220
}
221221

222-
private PolarisAuthorizableOperation determinePolicyAttachmentOperation(
222+
private PolarisAuthorizableOperation determinePolicyMappingOperation(
223223
PolicyAttachmentTarget target, PolarisResolvedPathWrapper targetWrapper, boolean isAttach) {
224224
return switch (targetWrapper.getRawLeafEntity().getType()) {
225225
case CATALOG ->

0 commit comments

Comments
 (0)