ChenSammi commented on code in PR #9859:
URL: https://github.com/apache/ozone/pull/9859#discussion_r2894018438
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/bucket/OMBucketSetPropertyRequest.java:
##########
@@ -252,14 +252,16 @@ private void checkAclPermission(
OzoneManager ozoneManager, String volumeName, String bucketName)
throws IOException {
if (ozoneManager.getAccessAuthorizer().isNative()) {
- UserGroupInformation ugi = createUGIForApi();
- String bucketOwner = ozoneManager.getBucketOwner(volumeName, bucketName,
- IAccessAuthorizer.ACLType.READ, OzoneObj.ResourceType.BUCKET);
- if (!ozoneManager.isAdmin(ugi) &&
- !ozoneManager.isOwner(ugi, bucketOwner)) {
- throw new OMException(
- "Bucket properties are allowed to changed by Admin and Owner",
- OMException.ResultCodes.PERMISSION_DENIED);
+ if (ozoneManager.isAdminAuthorizationEnabled()) {
Review Comment:
We don't need to check isAdminAuthorizationEnabled() again here, as it's
checked in the caller ozoneManager.getAclsEnabled().
--
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]