sfc-gh-yzou commented on code in PR #1529:
URL: https://github.com/apache/polaris/pull/1529#discussion_r2096542651


##########
polaris-core/src/main/java/org/apache/polaris/core/entity/PolarisPrivilege.java:
##########
@@ -150,6 +150,11 @@ public enum PolarisPrivilege {
   CATALOG_DETACH_POLICY(81, PolarisEntityType.CATALOG),
   NAMESPACE_DETACH_POLICY(82, PolarisEntityType.NAMESPACE),
   TABLE_DETACH_POLICY(83, PolarisEntityType.TABLE_LIKE, 
PolarisEntitySubType.ICEBERG_TABLE),
+  POLICY_MANAGE_GRANTS_ON_SECURABLE(

Review Comment:
   i see.



##########
service/common/src/main/java/org/apache/polaris/service/admin/PolarisAdminService.java:
##########
@@ -528,6 +533,47 @@ private void authorizeGrantOnTableLikeOperationOrThrow(
         catalogRoleWrapper);
   }
 
+  private void authorizeGrantOnPolicyOperationOrThrow(
+      PolarisAuthorizableOperation op,
+      String catalogName,
+      PolicyIdentifier identifier,
+      String catalogRoleName) {
+    resolutionManifest =
+        entityManager.prepareResolutionManifest(callContext, securityContext, 
catalogName);
+    resolutionManifest.addPath(
+        new ResolverPath(
+            PolarisCatalogHelpers.identifierToList(identifier.getNamespace(), 
identifier.getName()),
+            PolarisEntityType.POLICY),
+        identifier);
+    resolutionManifest.addPath(
+        new ResolverPath(List.of(catalogRoleName), 
PolarisEntityType.CATALOG_ROLE),
+        catalogRoleName);
+    ResolverStatus status = resolutionManifest.resolveAll();
+    if (status.getStatus() == 
ResolverStatus.StatusEnum.ENTITY_COULD_NOT_BE_RESOLVED) {

Review Comment:
   sg!



-- 
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