DaanHoogland commented on code in PR #7599:
URL: https://github.com/apache/cloudstack/pull/7599#discussion_r1390737233
##########
plugins/api/discovery/src/main/java/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java:
##########
@@ -293,6 +310,22 @@ public ListResponse<? extends BaseResponse> listApis(User
user, String name) {
return response;
}
+ private void removeQuotaApisIfQuotaEnabledButQuotaDisabledForAccount(User
user, List<String> apisAllowed) {
+ if (PluginAccessConfigs.QuotaPluginEnabled.value() &&
!PluginAccessConfigs.QuotaAccountEnabled.valueIn(user.getAccountId())) {
+ apisAllowed.removeAll(quotaCmdList);
+ apisAllowed.add("quotaIsEnabled");
+ }
+ }
+
+ private boolean
accountNotAdminAndQuotaEnabledAndQuotaAccountNotEnabledAndApiNameInQuotaCmdList(User
user, String name, Account account) {
Review Comment:
though the name surely must describe the function of the method, it might be
an idea to give it the name of its intent. Surely that will be shorter and thus
mor readable. (not a judgement of the code, just a suggestion)
--
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]