duongkame commented on code in PR #3971:
URL: https://github.com/apache/ozone/pull/3971#discussion_r1098104055
##########
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:
The original problem is: volumes are returned to unauthorized users. Why
don't we just filter volumes to only return those that the requesting user
(remoteUserUgi) has access to?
--
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]