Skip to content

Commit 5bd9a6f

Browse files
committed
Added user name uuid to logging
1 parent 6bb9ab9 commit 5bd9a6f

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
@@ -900,27 +900,27 @@ private void buildAuditTrail(final StringBuilder auditTrailSb, final String comm
900900
protected boolean verifyApiKeyAccessAllowed(User user, Account account) {
901901
Boolean apiKeyAccessEnabled = user.getApiKeyAccess();
902902
if (apiKeyAccessEnabled != null) {
903-
if (apiKeyAccessEnabled == true) {
903+
if (Boolean.TRUE.equals(apiKeyAccessEnabled)) {
904904
return true;
905905
} else {
906-
logger.info("Api-Key access is disabled for the User");
906+
logger.info("Api-Key access is disabled for the User " + user.toString());
907907
return false;
908908
}
909909
}
910910
apiKeyAccessEnabled = account.getApiKeyAccess();
911911
if (apiKeyAccessEnabled != null) {
912-
if (apiKeyAccessEnabled == true) {
912+
if (Boolean.TRUE.equals(apiKeyAccessEnabled)) {
913913
return true;
914914
} else {
915-
logger.info("Api-Key access is disabled for the Account");
915+
logger.info("Api-Key access is disabled for the Account " + account.toString());
916916
return false;
917917
}
918918
}
919919
apiKeyAccessEnabled = apiKeyAccess.valueIn(account.getDomainId());
920-
if (apiKeyAccessEnabled == true) {
920+
if (Boolean.TRUE.equals(apiKeyAccessEnabled)) {
921921
return true;
922922
} else {
923-
logger.info("Api-Key access is disabled by the Domain level setting");
923+
logger.info("Api-Key access is disabled by the Domain level setting api.key.access");
924924
}
925925
return false;
926926
}

0 commit comments

Comments
 (0)