smengcl commented on issue #696: HDDS-3056. Allow users to list volumes they 
have access to, and optionally allow all users to list all volumes
 should've accomplished the "optionally allow all users to list all volumes" 
part. I'll add test for that later.
   As for the "Allow users to list volumes they have access to" part, first I 
was trying to write the code in `OmMetadataManagerImpl#listAllVolumes`, but 
then realized it wasn't a good spot to check for ACLs since that class 
shouldn't really import `IAccessAuthorizer` (as used in 
   So eventually I decide to implement the logic in 
`OzoneManager#listVolumeByUser`. Since the deeper level calls into 
`VolumeManager` and `OmMetadataManager` doesn't have access to ACL (for the 
reason described in the previous paragraph), the implementation lists all 
volumes internally. And then checks ACL for each volume with current UGI when 
ACL is enabled.
   -- This might lead to higher memory consumption when there are a lot of 
volumes existing in OM. But it requires a bit more change to mitigate this. I 
might try to put some of the listing iterator logic in `OzoneManager` to solve 
this, if this is a problem.

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:

With regards,
Apache Git Services

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to