You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "z-bb (via GitHub)" <gi...@apache.org> on 2023/06/20 07:32:19 UTC

[GitHub] [ozone] z-bb commented on a diff in pull request #4928: HDDS-8456. Scm supports read only administrators.

z-bb commented on code in PR #4928:
URL: https://github.com/apache/ozone/pull/4928#discussion_r1234856124


##########
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:
   @adoroszlai Thanks for review, I made some changes, please review again.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org