rafaelweingartner commented on a change in pull request #2894: api: don't 
throttle api discovery for listApis command
URL: https://github.com/apache/cloudstack/pull/2894#discussion_r224415641
 
 

 ##########
 File path: 
plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java
 ##########
 @@ -223,7 +223,9 @@ private ApiDiscoveryResponse getCmdRequestMap(Class<?> 
cmdClass, APICommand apiC
 
             for (APIChecker apiChecker : _apiAccessCheckers) {
                 try {
-                    apiChecker.checkAccess(user, name);
+                    if 
(!"ApiRateLimitServiceImpl".equals(apiChecker.getName())) {
 
 Review comment:
   What if you used the command class instead? I mean, you are using the 
"service class", but at this point here you have the command that was used to 
list the APIs, right?  You can use it, and then you do not need to use this 
hardcoded String.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to