rakeshadr commented on a change in pull request #2008:
URL: https://github.com/apache/ozone/pull/2008#discussion_r591596415



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -1828,6 +1828,57 @@ public boolean checkAcls(ResourceType resType, StoreType 
storeType,
     }
   }
 
+  /**
+   * CheckAcls for the ozone object.
+   *
+   * @return true if permission granted, false if permission denied.
+   * @throws OMException ResultCodes.PERMISSION_DENIED if permission denied
+   *                     and throwOnPermissionDenied set to true.
+   */
+  @SuppressWarnings("parameternumber")
+  public boolean checkAcls(ResourceType resType, StoreType storeType,
+      ACLType aclType, String vol, String bucket, String key,
+      UserGroupInformation ugi, InetAddress remoteAddress, String hostName,
+      boolean throwIfPermissionDenied, String volumeOwner,
+      boolean recursiveAccessCheck)
+      throws OMException {
+    OzoneObj obj = OzoneObjInfo.Builder.newBuilder()
+        .setResType(resType)
+        .setStoreType(storeType)
+        .setVolumeName(vol)
+        .setBucketName(bucket)
+        .setKeyName(key).build();
+    RequestContext context = RequestContext.newBuilder()

Review comment:
       > RequestContext changes, we will have to add a chain of checkAcls change
   
   @xiaoyuyao Are you pointing to a case where user performed delete/rename on 
a parentDir which has millions of subpaths, now for every subpath ozoneManager 
needs to invoke checkAcls by creating a `RequestContext context = 
RequestContext.newBuilder()` ?
   
   Please correct me if I missed something. Thanks!




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to