HonahX commented on code in PR #1529:
URL: https://github.com/apache/polaris/pull/1529#discussion_r2096221531


##########
service/common/src/main/java/org/apache/polaris/service/admin/PolarisAdminService.java:
##########
@@ -1937,4 +2023,68 @@ private boolean revokePrivilegeOnTableLikeFromRole(
             privilege)
         .isSuccess();
   }
+
+  private boolean grantPrivilegeOnPolicyEntityToRole(
+      String catalogName,
+      String catalogRoleName,
+      PolicyIdentifier identifier,
+      PolarisPrivilege privilege) {
+    if (findCatalogByName(catalogName).isEmpty()) {
+      throw new NotFoundException("Parent catalog %s not found", catalogName);
+    }
+    PolarisEntity catalogRoleEntity =
+        findCatalogRoleByName(catalogName, catalogRoleName)
+            .orElseThrow(() -> new NotFoundException("CatalogRole %s not 
found", catalogRoleName));
+
+    PolarisResolvedPathWrapper resolvedPathWrapper =
+        resolutionManifest.getResolvedPath(
+            identifier, PolarisEntityType.POLICY, 
PolarisEntitySubType.ANY_SUBTYPE);

Review Comment:
   I double-checked and find that `getResolvedPath` only verify the subtypes so 
it does not help for policy. I will remove that. 



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