eric-maynard commented on code in PR #1416:
URL: https://github.com/apache/polaris/pull/1416#discussion_r2052785102


##########
service/common/src/main/java/org/apache/polaris/service/catalog/policy/PolicyCatalogHandler.java:
##########
@@ -141,4 +160,106 @@ private void authorizeBasicPolicyOperationOrThrow(
 
     initializeCatalog();
   }
+
+  private void authorizePolicyAttachmentOperationOrThrow(
+      PolicyIdentifier identifier, PolicyAttachmentTarget target, boolean 
isAttach) {
+    resolutionManifest =
+        entityManager.prepareResolutionManifest(callContext, securityContext, 
catalogName);
+    resolutionManifest.addPassthroughPath(
+        new ResolverPath(
+            PolarisCatalogHelpers.identifierToList(identifier.getNamespace(), 
identifier.getName()),
+            PolarisEntityType.POLICY,
+            true /* optional */),
+        identifier);
+
+    switch (target.getType()) {

Review Comment:
   1. Are these the only types supported by policies today? I can't attach a 
policy to a principal?
   2. We need a `default` case



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to