smengcl commented on code in PR #3971:
URL: https://github.com/apache/ozone/pull/3971#discussion_r1098102565


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -2665,6 +2665,12 @@ public List<OmVolumeArgs> listVolumeByUser(String 
userName, String prefix,
     try {
       metrics.incNumVolumeLists();
       if (isAclEnabled) {
+        String remoteUserName = remoteUserUgi.getShortUserName();
+        // if not admin nor list my own volumes, check ACL.
+        if (!remoteUserName.equals(userName) && !isAdmin(remoteUserUgi)) {

Review Comment:
   Thanks @duongkame @kerneltime for bringing this up.
   
   Looks like we need to convert `userName` to UGI then use its short name as 
well for comparison.



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