lhotari commented on code in PR #19975:
URL: https://github.com/apache/pulsar/pull/19975#discussion_r1160093628


##########
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/WorkerImpl.java:
##########
@@ -131,33 +125,45 @@ public Map<String, Collection<String>> 
getAssignments(String clientRole) {
         return ret;
     }
 
-    private boolean isSuperUser(final String clientRole) {
-        return clientRole != null && 
worker().getWorkerConfig().getSuperUserRoles().contains(clientRole);
+    private void throwIfNotSuperUser(Authentication authentication, String 
action) {
+        if (authentication.getClientRole() != null) {

Review Comment:
   this looks risky since the else branch doesn't throw an exception or verify 
that authorization/authentication is disabled



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

Reply via email to