Skip to content

Commit 7b24581

Browse files
committed
Added user name uuid to logging
1 parent a83734f commit 7b24581

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

server/src/main/java/com/cloud/api/ApiServer.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -878,27 +878,27 @@ private void buildAuditTrail(final StringBuilder auditTrailSb, final String comm
878878
protected boolean verifyApiKeyAccessAllowed(User user, Account account) {
879879
Boolean apiKeyAccessEnabled = user.getApiKeyAccess();
880880
if (apiKeyAccessEnabled != null) {
881-
if (apiKeyAccessEnabled == true) {
881+
if (Boolean.TRUE.equals(apiKeyAccessEnabled)) {
882882
return true;
883883
} else {
884-
logger.info("Api-Key access is disabled for the User");
884+
logger.info("Api-Key access is disabled for the User " + user.toString());
885885
return false;
886886
}
887887
}
888888
apiKeyAccessEnabled = account.getApiKeyAccess();
889889
if (apiKeyAccessEnabled != null) {
890-
if (apiKeyAccessEnabled == true) {
890+
if (Boolean.TRUE.equals(apiKeyAccessEnabled)) {
891891
return true;
892892
} else {
893-
logger.info("Api-Key access is disabled for the Account");
893+
logger.info("Api-Key access is disabled for the Account " + account.toString());
894894
return false;
895895
}
896896
}
897897
apiKeyAccessEnabled = apiKeyAccess.valueIn(account.getDomainId());
898-
if (apiKeyAccessEnabled == true) {
898+
if (Boolean.TRUE.equals(apiKeyAccessEnabled)) {
899899
return true;
900900
} else {
901-
logger.info("Api-Key access is disabled by the Domain level setting");
901+
logger.info("Api-Key access is disabled by the Domain level setting api.key.access");
902902
}
903903
return false;
904904
}

0 commit comments

Comments
 (0)