bernardodemarco commented on code in PR #9590: URL: https://github.com/apache/cloudstack/pull/9590#discussion_r1904372721
########## engine/schema/src/main/resources/META-INF/db/schema-42010to42100.sql: ########## @@ -24,3 +24,10 @@ CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.console_session', 'console_endpoint_ -- Add client_address column to cloud.console_session table CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.console_session', 'client_address', 'VARCHAR(45)'); + +-- Allow default roles to use quotaCreditsList +INSERT INTO cloud.role_permissions (uuid, role_id, rule, permission, sort_order) +SELECT uuid(), role_id, 'quotaCreditsList', permission, sort_order +FROM cloud.role_permissions rp +WHERE rule = 'quotaStatement' +AND NOT EXISTS(SELECT 1 FROM cloud.role_permissions rp_ WHERE rp.role_id = rp_.role_id AND rp_.rule = 'quotaCreditsList'); Review Comment: It would be interesting to format this query with backticks ########## plugins/database/quota/src/main/java/org/apache/cloudstack/api/response/QuotaCreditsResponse.java: ########## @@ -20,65 +20,62 @@ import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; -import org.apache.cloudstack.quota.vo.QuotaCreditsVO; import java.math.BigDecimal; -import java.math.RoundingMode; import java.util.Date; public class QuotaCreditsResponse extends BaseResponse { - @SerializedName("credits") - @Param(description = "the credit deposited") - private BigDecimal credits; + @SerializedName("credit") + @Param(description = "The credit deposited.") + private BigDecimal credit; - @SerializedName("updated_by") - @Param(description = "the user name of the admin who updated the credits") - private String updatedBy; + @SerializedName("creditoruserid") + @Param(description = "ID of the creditor user.") + private String creditorUserId; - @SerializedName("updated_on") - @Param(description = "the account name of the admin who updated the credits") - private Date updatedOn; + @SerializedName("creditorusername") + @Param(description = "ID of the creditor user.") + private String creditorUsername; Review Comment: ```suggestion @SerializedName("creditorusername") @Param(description = "Username of the creditor user.") private String creditorUsername; ``` -- 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: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org