Skip to content

Commit 6854ff4

Browse files
committed
fix the userid for api key access update event
1 parent 7b54a6f commit 6854ff4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server/src/main/java/com/cloud/user/AccountManagerImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,7 +1707,7 @@ protected void validateAndUpdateAccountApiKeyAccess(UpdateAccountCmd updateAccou
17071707
try {
17081708
ApiConstants.ApiKeyAccess access = ApiConstants.ApiKeyAccess.valueOf(updateAccountCmd.getApiKeyAccess().toUpperCase());
17091709
account.setApiKeyAccess(access.toBoolean());
1710-
ActionEventUtils.onActionEvent(User.UID_SYSTEM, account.getAccountId(), account.getDomainId(), EventTypes.API_KEY_ACCESS_UPDATE, "Api key access was changed for the account to " + access.toString(), account.getId(), ApiCommandResourceType.Account.toString());
1710+
ActionEventUtils.onActionEvent(User.UID_ADMIN, account.getAccountId(), account.getDomainId(), EventTypes.API_KEY_ACCESS_UPDATE, "Api key access was changed for the account to " + access.toString(), account.getId(), ApiCommandResourceType.Account.toString());
17111711
} catch (IllegalArgumentException ex) {
17121712
throw new InvalidParameterValueException("ApiKeyAccess value can only be Enabled/Disabled/Inherit");
17131713
}
@@ -2844,7 +2844,6 @@ public Map<String, String> getKeys(Long userId) {
28442844
preventRootDomainAdminAccessToRootAdminKeys(caller, account);
28452845
checkAccess(caller, account);
28462846

2847-
// TODO : can return api key access here
28482847
Map<String, String> keys = new HashMap<String, String>();
28492848
keys.put("apikey", user.getApiKey());
28502849
keys.put("secretkey", user.getSecretKey());

0 commit comments

Comments
 (0)