You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/03/09 16:24:30 UTC

[GitHub] [ozone] xiaoyuyao commented on a change in pull request #2008: HDDS-4932. [FSO] Provide list subpaths function to perform recursive ACL check during delete and rename op

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



##########
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:
       It seems every time the RequestContext changes, we will have to add a chain of checkAcls change. Can we pass a RequestContext (or its Builder) instead here for checkAcls to avoid future churns?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org