jojochuang commented on code in PR #11683:
URL: https://github.com/apache/ozone/pull/11683#discussion_r4362707822
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/OMClientRequest.java:
##########
@@ -632,6 +637,33 @@ public static String isValidKeyPath(String path) throws
OMException {
return OzoneFSUtils.isValidKeyPath(path, true);
}
+ /**
+ * Converts ACLs sent by the client.
+ * @throws OMException with INVALID_REQUEST if any of the ACLs is malformed
+ */
+ public static List<OzoneAcl> toOzoneAcls(List<OzoneAclInfo> acls) throws
OMException {
+ final List<OzoneAcl> ozoneAcls;
+ try {
+ ozoneAcls = OzoneAclUtil.fromProtobuf(acls);
+ } catch (IllegalArgumentException e) {
+ throw new OMException("Invalid ACL: " + e.getMessage(), INVALID_REQUEST);
+ }
+ checkAclRights(ozoneAcls);
+ return ozoneAcls;
+ }
Review Comment:
this is fine.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]