ivandika3 commented on code in PR #10328:
URL: https://github.com/apache/ozone/pull/10328#discussion_r3357123279


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/volume/acl/OMVolumeAclRequest.java:
##########
@@ -53,6 +55,43 @@ public abstract class OMVolumeAclRequest extends 
OMVolumeRequest {
     omVolumeAclOp = aclOp;
   }
 
+  @Override
+  public OzoneManagerProtocolProtos.OMRequest preExecute(OzoneManager 
ozoneManager)
+      throws IOException {
+    OzoneManagerProtocolProtos.OMRequest omRequest = 
super.preExecute(ozoneManager);
+
+    // ACL check during preExecute
+    if (ozoneManager.getAclsEnabled()) {
+      String volume = getVolumeName();
+      try {
+        checkAcls(ozoneManager, OzoneObj.ResourceType.VOLUME,
+            OzoneObj.StoreType.OZONE, IAccessAuthorizer.ACLType.WRITE_ACL,
+            volume, null, null);

Review Comment:
   Seems this is a regression, previously we don't always require WRITE_ACL, 
but not super.preExecute requires WRITE_ACL. Please check this and write a test 
for this in another ticket.



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