whbing commented on code in PR #4738:
URL: https://github.com/apache/ozone/pull/4738#discussion_r1231045589
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OzoneAclUtil.java:
##########
@@ -180,6 +180,25 @@ public static boolean inheritDefaultAcls(List<OzoneAcl>
acls,
return false;
}
+ /**
+ * Helper function to convert the scope of ACLs to DEFAULT.
+ * This method is called in ACL inheritance scenarios.
+ * @param acls
+ */
+ public static void toDefaultScope(List<OzoneAcl> acls) {
+ acls.forEach(a -> a.setAclScope(DEFAULT));
+ }
+
+ /**
+ * Helper function to filter the DEFAULT scope ACLs.
+ * This method is called in ACL inheritance scenarios.
+ * @param acls
+ */
+ public static List<OzoneAcl> filterDefaultScope(List<OzoneAcl> acls) {
Review Comment:
> This is not needed as can use inheritDefaultAcl can be used.
Used method `getAclsForDir` similar `getAclsForKey`.
--
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]