jerqi commented on code in PR #6100:
URL: https://github.com/apache/gravitino/pull/6100#discussion_r1904995138
##########
authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerAuthorizationHDFSPlugin.java:
##########
@@ -183,36 +540,66 @@ public List<AuthorizationSecurableObject>
translatePrivilege(SecurableObject sec
// in the RangerAuthorizationHDFSPlugin.
break;
case USE_SCHEMA:
+ switch (securableObject.type()) {
+ case METALAKE:
+ case CATALOG:
+ case SCHEMA:
+ AuthorizationUtils.getMetadataObjectLocation(
+ identifier,
MetadataObjectUtil.toEntityType(securableObject))
+ .stream()
+ .forEach(
+ locationPath -> {
+ PathBasedMetadataObject pathBaseMetadataObject
=
+ new PathBasedMetadataObject(
+ securableObject.parent(),
+ securableObject.name(),
+ locationPath,
+ PathBasedMetadataObject.Type.PATH);
+
pathBaseMetadataObject.validateAuthorizationMetadataObject();
+ rangerSecurableObjects.add(
+ generateAuthorizationSecurableObject(
+ pathBaseMetadataObject.names(),
+ locationPath,
+ PathBasedMetadataObject.Type.PATH,
+ rangerPrivileges));
+ });
+ break;
+ default:
+ checkOmissionTranslate(
Review Comment:
I don't get the meaning of this check.
--
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]