ChenSammi commented on code in PR #4565:
URL: https://github.com/apache/ozone/pull/4565#discussion_r1172176234
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/security/acl/OzoneNativeAuthorizer.java:
##########
@@ -92,12 +91,24 @@ public boolean checkAccess(IOzoneObj ozObject,
RequestContext context)
}
// bypass all checks for admin
- boolean isAdmin = isAdmin(context.getClientUgi());
+ boolean isAdmin = isAdmin(ozAdmins, context.getClientUgi());
if (isAdmin) {
return true;
}
boolean isOwner = isOwner(context.getClientUgi(), context.getOwnerName());
+
+ boolean isReadOnlyAdmin = isAdmin(ozReadOnlyAdmins,
+ context.getClientUgi());
+
+ // bypass read checks for read only admin users
+ if (isReadOnlyAdmin
+ && (context.getAclRights() == ACLType.READ
+ || context.getAclRights() == ACLType.READ_ACL
+ || context.getAclRights() == ACLType.LIST)) {
+ return true;
+ }
Review Comment:
@z-bb , thanks for updating the patch. It looks overall good. Just this
minor comment.
Since you have created the sub jira for this feature, shall we update the
title of this patch to "HDDS-8455. Om supports read only administrators." ?
--
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]