adoroszlai commented on code in PR #4928:
URL: https://github.com/apache/ozone/pull/4928#discussion_r1233940154
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java:
##########
@@ -1876,16 +1879,31 @@ public boolean checkLeader() {
}
}
+ public void setScmReadOnlyAdmins(OzoneAdmins scmReadOnlyAdmins) {
+ this.scmReadOnlyAdmins = scmReadOnlyAdmins;
+ }
+
private void checkAdminAccess(String op) throws IOException {
- checkAdminAccess(getRemoteUser());
+ switch (op) {
+ case "startReconfiguration":
+ checkAdminAccess(getRemoteUser(), false);
+ break;
+ case "getReconfigurationStatus":
+ case "listReconfigurableProperties":
+ checkAdminAccess(getRemoteUser(), true);
+ break;
+ default:
+ }
Review Comment:
`default` branch should check write admin access.
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java:
##########
@@ -1876,16 +1879,31 @@ public boolean checkLeader() {
}
}
+ public void setScmReadOnlyAdmins(OzoneAdmins scmReadOnlyAdmins) {
+ this.scmReadOnlyAdmins = scmReadOnlyAdmins;
Review Comment:
Would be nice to omit this, the test can set configuration via
`OzoneConfiguration`.
--
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]