z-bb commented on code in PR #4565:
URL: https://github.com/apache/ozone/pull/4565#discussion_r1170903305


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/security/acl/OzoneNativeAuthorizer.java:
##########
@@ -101,11 +100,18 @@ public boolean checkAccess(IOzoneObj ozObject, 
RequestContext context)
     boolean isListAllVolume = ((context.getAclRights() == ACLType.LIST) &&
         objInfo.getVolumeName().equals(OzoneConsts.OZONE_ROOT));
     if (isListAllVolume) {
-      return getAllowListAllVolumes();
+      return getAllowListAllVolumes()
+          || isAdmin(ozSuperReadAdmins, context.getClientUgi());
     }
 
     ACLType parentAclRight = OzoneAclUtils.getParentNativeAcl(
         context.getAclRights(), objInfo.getResourceType());
+
+    // bypass only read checks for super read
+    if (isAdmin(ozSuperReadAdmins, context.getClientUgi())
+        && parentAclRight == ACLType.READ) {
+      return true;

Review Comment:
   The above code is deprecat.
   current latest code is
   ```
   boolean isSuperReadAdmin = isAdmin(ozSuperReadAdmins,
           context.getClientUgi());
   
       // bypass read checks for super read users
       if (isSuperReadAdmin && (context.getAclRights() == ACLType.READ
           || context.getAclRights() == ACLType.READ_ACL
           || context.getAclRights() == ACLType.LIST)) {
         return true;
       }
   ```
   Do you think this is a problem @ChenSammi 



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

Reply via email to