You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/src/main/java/org/apache/cloudstack/api/command/admin/user/DeleteUserKeysCmd.java
-1Lines changed: 0 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,6 @@
31
31
@APICommand(name = "deleteUserKeys", description = "Deletes a keypair from a user", responseObject = SuccessResponse.class,
32
32
since = "4.23.0", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
33
33
publicclassDeleteUserKeysCmdextendsBaseAsyncCmd {
34
-
35
34
@ACL
36
35
@Parameter(name = ApiConstants.KEYPAIR_ID, type = CommandType.UUID, entityType = ApiKeyPairResponse.class, required = true, description = "ID of the keypair to be deleted.")
description = "This command allows a user to register for the developer API, returning a secret key and an API key. This request is made through the integration API port, so it is a privileged command and must be made on behalf of a user. It is up to the implementer just how the username and password are entered, and then how that translates to an integration API request. Both secret key and API key should be returned to the user",
45
+
description = "Registers an API key pair (API and secret keys) for a user.",
@Parameter(name = ApiConstants.RULES, type = CommandType.MAP, description = "Rules param list, lower indexed rules take precedence over higher. If no rules are informed, " +
66
-
"defaults to allowing all account permissions. Example input: rules[0].rule=* rules[0].permission=allow")
65
+
@Parameter(name = ApiConstants.RULES, type = CommandType.MAP, description = "The rules of the API key pair. If no rules are informed, " +
66
+
"defaults to allowing all account permissions. Otherwise, only the explicitly informed permissions for the key pair will be " +
67
+
"considered. Lower indexed rules take precedence over higher. Thus, in the following example: " +
68
+
"\"rules[0].rule=deleteUserKeys rules[0].permission=deny rules[1].rule=*UserKeys* rules[1].permission=allow\", all rules matching " +
69
+
"the expression \"*UserKeys*\" will be allowed, except for \"deleteUserKeys\".")
67
70
privateMaprules;
68
71
69
72
publicvoidsetUserId(LonguserId) {
@@ -126,8 +129,8 @@ public List<Map<String, Object>> getRules() {
@Parameter(name = ApiConstants.USER_API_KEY, type = CommandType.STRING, description = "The API key for the user. Must be specified with usersecretkey")
49
+
@Parameter(name = ApiConstants.USER_API_KEY, type = CommandType.STRING, description = "Updates the latest API key of the user. Must be specified with usersecretkey")
50
50
privateStringuserApiKey;
51
51
52
52
@Parameter(name = ApiConstants.EMAIL, type = CommandType.STRING, description = "Email")
@@ -70,7 +70,7 @@ public class UpdateUserCmd extends BaseCmd {
70
70
@Parameter(name = ApiConstants.CURRENT_PASSWORD, type = CommandType.STRING, description = "Current password that was being used by the user. You must inform the current password when updating the password.", acceptedOnAdminPort = false)
71
71
privateStringcurrentPassword;
72
72
73
-
@Parameter(name = ApiConstants.USER_SECRET_KEY, type = CommandType.STRING, description = "The secret key for the user. Must be specified with userapikey.")
73
+
@Parameter(name = ApiConstants.USER_SECRET_KEY, type = CommandType.STRING, description = "Updates the latest secret key of the user. Must be specified with userapikey.")
74
74
privateStringuserSecretKey;
75
75
76
76
@Parameter(name = ApiConstants.API_KEY_ACCESS, type = CommandType.STRING, description = "Determines if Api key access for this user is enabled, disabled or inherits the value from its parent, the owning account", since = "4.20.1.0", authorized = {RoleType.Admin})
@@ -3528,8 +3526,8 @@ private ApiKeyPairVO validateAndPersistKeyPairAndPermissions(Account account, Ap
3528
3526
}
3529
3527
3530
3528
if (!isApiKeySupersetOfPermission(allPermissions, permissions)) {
3531
-
thrownewInvalidParameterValueException(String.format("The keypair being created has a bigger set of permissions than the account [%s] that owns it. This is " +
3532
-
"not allowed.", account.getUuid()));
3529
+
thrownewInvalidParameterValueException(String.format("The key pair being created has a bigger set of permissions than the account [%s] " +
3530
+
"that owns it. This is not allowed.", account.getUuid()));
0 commit comments