Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ceed660
cli changes to update user/account, list by apikeyaccess, domain leve…
abh1sar Sep 25, 2024
2f276e6
UI changes for updating user/account and searchfilter in listview
abh1sar Sep 26, 2024
ad4171a
make the api parameters and setting accessible only to root admin
abh1sar Sep 27, 2024
09bf1a0
revert changes to ui/package-lock.json
abh1sar Sep 27, 2024
2869b13
minor changes to description strings
abh1sar Sep 27, 2024
67c9c62
UT for ApiServer and AccountManagerImpl classes
abh1sar Sep 27, 2024
aadf4cb
fix pre-commit failure
abh1sar Sep 27, 2024
31eb378
Merge branch 'main' into apikey
abh1sar Sep 27, 2024
048642d
Added a constant for the string System
abh1sar Sep 28, 2024
b7085e6
Merge branch 'apikey' of https://github.com/abh1sar/cloudstack into apik
abh1sar Sep 28, 2024
aa6bc35
UT for searchForUsers and searchForAccounts
abh1sar Sep 30, 2024
65dde8e
Merge branch 'main' into apikey
abh1sar Sep 30, 2024
f736d77
Fix marvin test error
abh1sar Sep 30, 2024
51be0cb
Merge branch 'apikey' of https://github.com/abh1sar/cloudstack into apik
abh1sar Sep 30, 2024
c087de4
Merge branch '4.19'
DaanHoogland Oct 2, 2024
113c700
Update schema to use idempotent add column
abh1sar Oct 3, 2024
d6181d5
Fix `updateTemplatePermission` when the UI is set to a language other…
lucas-a-martins Oct 4, 2024
a83734f
Merge remote-tracking branch 'upstream/main' into apik
abh1sar Oct 10, 2024
7b24581
Added user name uuid to logging
abh1sar Oct 10, 2024
3cbbb5f
Add events when api key access is changed via api or config setting
abh1sar Oct 16, 2024
195da94
fix the userid for api key access update event
abh1sar Oct 16, 2024
b35fe8b
Fix ut failure after event logging
abh1sar Oct 16, 2024
7858d0f
Convert drop down to radio-button in edit user and account
abh1sar Oct 17, 2024
690073c
Add ApiKeyAccess status in User InfoCard for Users if Api key is gene…
abh1sar Oct 17, 2024
ae0d524
Return apiKeyAccess in user and account response only for Root Admin
abh1sar Oct 17, 2024
0da6265
fixed noredist build failure
abh1sar Oct 17, 2024
9363e50
Show apikeyaccess on the left panel in the user view for root admins …
abh1sar Oct 17, 2024
a90a7f6
don't show divider if apiKeyAccess is not shown to user
abh1sar Oct 17, 2024
a9805b5
Fix events generated to set Username, Account and Domain of the calle…
abh1sar Oct 17, 2024
6aa116c
cli changes to update user/account, list by apikeyaccess, domain leve…
abh1sar Sep 25, 2024
212bca5
UI changes for updating user/account and searchfilter in listview
abh1sar Sep 26, 2024
610ef4d
make the api parameters and setting accessible only to root admin
abh1sar Sep 27, 2024
6526033
revert changes to ui/package-lock.json
abh1sar Sep 27, 2024
45df7f1
minor changes to description strings
abh1sar Sep 27, 2024
309ec72
UT for ApiServer and AccountManagerImpl classes
abh1sar Sep 27, 2024
e1e51ff
fix pre-commit failure
abh1sar Sep 27, 2024
d6ddd14
Added a constant for the string System
abh1sar Sep 28, 2024
2e09d8c
UT for searchForUsers and searchForAccounts
abh1sar Sep 30, 2024
6e7538b
Fix marvin test error
abh1sar Sep 30, 2024
6bb9ab9
Update schema to use idempotent add column
abh1sar Oct 3, 2024
5bd9a6f
Added user name uuid to logging
abh1sar Oct 10, 2024
7b54a6f
Add events when api key access is changed via api or config setting
abh1sar Oct 16, 2024
6854ff4
fix the userid for api key access update event
abh1sar Oct 16, 2024
3499240
Fix ut failure after event logging
abh1sar Oct 16, 2024
c759691
Convert drop down to radio-button in edit user and account
abh1sar Oct 17, 2024
554d0c9
Add ApiKeyAccess status in User InfoCard for Users if Api key is gene…
abh1sar Oct 17, 2024
f64c0e6
Return apiKeyAccess in user and account response only for Root Admin
abh1sar Oct 17, 2024
7bb3b6e
fixed noredist build failure
abh1sar Oct 17, 2024
1ec4c1f
Show apikeyaccess on the left panel in the user view for root admins …
abh1sar Oct 17, 2024
2fadea9
don't show divider if apiKeyAccess is not shown to user
abh1sar Oct 17, 2024
a099946
Fix events generated to set Username, Account and Domain of the calle…
abh1sar Oct 17, 2024
0b508e0
Merge branch 'apikey' of https://github.com/abh1sar/cloudstack into apik
abh1sar Dec 1, 2024
4da3265
Added DB upgrade path from 42000 to 42010
abh1sar Dec 1, 2024
564d2b4
Merge remote-tracking branch 'upstream/4.20' into apik
abh1sar Dec 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/src/main/java/com/cloud/event/EventTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ public class EventTypes {

//register for user API and secret keys
public static final String EVENT_REGISTER_FOR_SECRET_API_KEY = "REGISTER.USER.KEY";
public static final String API_KEY_ACCESS_UPDATE = "API.KEY.ACCESS.UPDATE";

// Template Events
public static final String EVENT_TEMPLATE_CREATE = "TEMPLATE.CREATE";
Expand Down
4 changes: 4 additions & 0 deletions api/src/main/java/com/cloud/user/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,8 @@ public static Type getFromValue(Integer type){

boolean isDefault();

public void setApiKeyAccess(Boolean apiKeyAccess);

public Boolean getApiKeyAccess();

}
5 changes: 3 additions & 2 deletions api/src/main/java/com/cloud/user/AccountService.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.util.List;
import java.util.Map;

import com.cloud.utils.Pair;
import org.apache.cloudstack.acl.ControlledEntity;
import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.acl.SecurityChecker.AccessType;
Expand Down Expand Up @@ -127,9 +128,9 @@ User createUser(String userName, String password, String firstName, String lastN
*/
UserAccount getUserAccountById(Long userId);

public Map<String, String> getKeys(GetUserKeysCmd cmd);
public Pair<Boolean, Map<String, String>> getKeys(GetUserKeysCmd cmd);

public Map<String, String> getKeys(Long userId);
public Pair<Boolean, Map<String, String>> getKeys(Long userId);

/**
* Lists user two-factor authentication provider plugins
Expand Down
5 changes: 5 additions & 0 deletions api/src/main/java/com/cloud/user/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,9 @@ public enum Source {
public boolean isUser2faEnabled();

public String getKeyFor2fa();

public void setApiKeyAccess(Boolean apiKeyAccess);

public Boolean getApiKeyAccess();

}
27 changes: 27 additions & 0 deletions api/src/main/java/org/apache/cloudstack/api/ApiConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
public static final String ALLOW_USER_FORCE_STOP_VM = "allowuserforcestopvm";
public static final String ANNOTATION = "annotation";
public static final String API_KEY = "apikey";
public static final String API_KEY_ACCESS = "apikeyaccess";
public static final String ARCHIVED = "archived";
public static final String ARCH = "arch";
public static final String AS_NUMBER = "asnumber";
Expand Down Expand Up @@ -1247,4 +1248,30 @@
public enum DomainDetails {
all, resource, min;
}

public enum ApiKeyAccess {
DISABLED(false),
ENABLED(true),
INHERIT(null);

Boolean apiKeyAccess;

ApiKeyAccess(Boolean keyAccess) {
apiKeyAccess = keyAccess;
}

public Boolean toBoolean() {

Check warning on line 1263 in api/src/main/java/org/apache/cloudstack/api/ApiConstants.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/ApiConstants.java#L1263

Added line #L1263 was not covered by tests
return apiKeyAccess;
}

Check warning on line 1265 in api/src/main/java/org/apache/cloudstack/api/ApiConstants.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/ApiConstants.java#L1265

Added line #L1265 was not covered by tests

public static ApiKeyAccess fromBoolean(Boolean value) {

Check warning on line 1267 in api/src/main/java/org/apache/cloudstack/api/ApiConstants.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/ApiConstants.java#L1267

Added line #L1267 was not covered by tests
if (value == null) {
return INHERIT;

Check warning on line 1269 in api/src/main/java/org/apache/cloudstack/api/ApiConstants.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/ApiConstants.java#L1269

Added line #L1269 was not covered by tests
} else if (value) {
return ENABLED;

Check warning on line 1271 in api/src/main/java/org/apache/cloudstack/api/ApiConstants.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/ApiConstants.java#L1271

Added line #L1271 was not covered by tests
} else {
return DISABLED;

Check warning on line 1273 in api/src/main/java/org/apache/cloudstack/api/ApiConstants.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/ApiConstants.java#L1273

Added line #L1273 was not covered by tests
}
}

Check warning on line 1275 in api/src/main/java/org/apache/cloudstack/api/ApiConstants.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/ApiConstants.java#L1275

Added line #L1275 was not covered by tests
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@

import javax.inject.Inject;

import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.api.ApiCommandResourceType;
import org.apache.cloudstack.api.command.user.UserCmd;
import org.apache.cloudstack.api.response.RoleResponse;

import org.apache.cloudstack.acl.SecurityChecker.AccessType;
Expand All @@ -40,8 +42,8 @@
import com.cloud.user.Account;

@APICommand(name = "updateAccount", description = "Updates account information for the authenticated user", responseObject = AccountResponse.class, entityType = {Account.class},
requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
public class UpdateAccountCmd extends BaseCmd {
responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
public class UpdateAccountCmd extends BaseCmd implements UserCmd {

/////////////////////////////////////////////////////
//////////////// API parameters /////////////////////
Expand Down Expand Up @@ -70,6 +72,9 @@
@Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "Details for the account used to store specific parameters")
private Map details;

@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 domain level setting api.key.access", since = "4.20.1.0", authorized = {RoleType.Admin})
private String apiKeyAccess;

@Inject
RegionService _regionService;

Expand Down Expand Up @@ -109,6 +114,10 @@
return params;
}

public String getApiKeyAccess() {
return apiKeyAccess;
}

Check warning on line 119 in api/src/main/java/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java#L117-L119

Added lines #L117 - L119 were not covered by tests

/////////////////////////////////////////////////////
/////////////// API Implementation///////////////////
/////////////////////////////////////////////////////
Expand All @@ -131,7 +140,7 @@
public void execute() {
Account result = _regionService.updateAccount(this);
if (result != null){
AccountResponse response = _responseGenerator.createAccountResponse(ResponseView.Full, result);
AccountResponse response = _responseGenerator.createAccountResponse(getResponseView(), result);

Check warning on line 143 in api/src/main/java/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java#L143

Added line #L143 was not covered by tests
response.setResponseName(getCommandName());
setResponseObject(response);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import com.cloud.user.Account;
import com.cloud.user.User;
import com.cloud.utils.Pair;
import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
Expand Down Expand Up @@ -54,11 +55,13 @@
else return Account.ACCOUNT_ID_SYSTEM;
}
public void execute(){
Map<String, String> keys = _accountService.getKeys(this);
Pair<Boolean, Map<String, String>> keys = _accountService.getKeys(this);

Check warning on line 58 in api/src/main/java/org/apache/cloudstack/api/command/admin/user/GetUserKeysCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/admin/user/GetUserKeysCmd.java#L58

Added line #L58 was not covered by tests

RegisterResponse response = new RegisterResponse();
if(keys != null){
response.setApiKey(keys.get("apikey"));
response.setSecretKey(keys.get("secretkey"));
response.setApiKeyAccess(keys.first());
response.setApiKey(keys.second().get("apikey"));
response.setSecretKey(keys.second().get("secretkey"));

Check warning on line 64 in api/src/main/java/org/apache/cloudstack/api/command/admin/user/GetUserKeysCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/admin/user/GetUserKeysCmd.java#L62-L64

Added lines #L62 - L64 were not covered by tests
}

response.setObjectName("userkeys");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,23 @@
import com.cloud.server.ResourceIcon;
import com.cloud.server.ResourceTag;
import com.cloud.user.Account;
import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.api.command.user.UserCmd;
import org.apache.cloudstack.api.response.ResourceIconResponse;

import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseListAccountResourcesCmd;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ResponseObject.ResponseView;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.UserResponse;

import java.util.List;

@APICommand(name = "listUsers", description = "Lists user accounts", responseObject = UserResponse.class,
requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
public class ListUsersCmd extends BaseListAccountResourcesCmd {
responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
public class ListUsersCmd extends BaseListAccountResourcesCmd implements UserCmd {


/////////////////////////////////////////////////////
Expand All @@ -53,6 +56,9 @@
@Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, description = "List user by the username")
private String username;

@Parameter(name = ApiConstants.API_KEY_ACCESS, type = CommandType.STRING, description = "List users by the Api key access value", since = "4.20.1.0", authorized = {RoleType.Admin})
private String apiKeyAccess;

@Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN,
description = "flag to display the resource icon for users")
private Boolean showIcon;
Expand All @@ -77,6 +83,10 @@
return username;
}

public String getApiKeyAccess() {
return apiKeyAccess;
}

Check warning on line 88 in api/src/main/java/org/apache/cloudstack/api/command/admin/user/ListUsersCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/admin/user/ListUsersCmd.java#L86-L88

Added lines #L86 - L88 were not covered by tests

public Boolean getShowIcon() {
return showIcon != null ? showIcon : false;
}
Expand All @@ -87,7 +97,7 @@

@Override
public void execute() {
ListResponse<UserResponse> response = _queryService.searchForUsers(this);
ListResponse<UserResponse> response = _queryService.searchForUsers(getResponseView(), this);

Check warning on line 100 in api/src/main/java/org/apache/cloudstack/api/command/admin/user/ListUsersCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/admin/user/ListUsersCmd.java#L100

Added line #L100 was not covered by tests
response.setResponseName(getCommandName());
this.setResponseObject(response);
if (response != null && response.getCount() > 0 && getShowIcon()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import javax.inject.Inject;

import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandResourceType;
import org.apache.cloudstack.api.ApiConstants;
Expand Down Expand Up @@ -69,6 +70,9 @@
@Parameter(name = ApiConstants.USER_SECRET_KEY, type = CommandType.STRING, description = "The secret key for the user. Must be specified with userApiKey")
private String secretKey;

@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})
private String apiKeyAccess;

@Parameter(name = ApiConstants.TIMEZONE,
type = CommandType.STRING,
description = "Specifies a timezone for this command. For more information on the timezone parameter, see Time Zone Format.")
Expand Down Expand Up @@ -120,6 +124,10 @@
return secretKey;
}

public String getApiKeyAccess() {
return apiKeyAccess;
}

Check warning on line 129 in api/src/main/java/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java#L127-L129

Added lines #L127 - L129 were not covered by tests

public String getTimezone() {
return timezone;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.util.EnumSet;
import java.util.List;

import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandResourceType;
import org.apache.cloudstack.api.ApiConstants;
Expand Down Expand Up @@ -70,6 +71,9 @@
description = "comma separated list of account details requested, value can be a list of [ all, resource, min]")
private List<String> viewDetails;

@Parameter(name = ApiConstants.API_KEY_ACCESS, type = CommandType.STRING, description = "List accounts by the Api key access value", since = "4.20.1.0", authorized = {RoleType.Admin})
private String apiKeyAccess;

@Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN,
description = "flag to display the resource icon for accounts")
private Boolean showIcon;
Expand Down Expand Up @@ -120,6 +124,10 @@
return dv;
}

public String getApiKeyAccess() {
return apiKeyAccess;
}

Check warning on line 129 in api/src/main/java/org/apache/cloudstack/api/command/user/account/ListAccountsCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/user/account/ListAccountsCmd.java#L127-L129

Added lines #L127 - L129 were not covered by tests

public boolean getShowIcon() {
return showIcon != null ? showIcon : false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@
@Param(description = "The tagged resource limit and count for the account", since = "4.20.0")
List<TaggedResourceLimitAndCountResponse> taggedResources;

@SerializedName(ApiConstants.API_KEY_ACCESS)
@Param(description = "whether api key access is Enabled, Disabled or set to Inherit (it inherits the value from the parent)", since = "4.20.1.0")
ApiConstants.ApiKeyAccess apiKeyAccess;

@Override
public String getObjectId() {
return id;
Expand Down Expand Up @@ -554,4 +558,8 @@
public void setTaggedResourceLimitsAndCounts(List<TaggedResourceLimitAndCountResponse> taggedResourceLimitsAndCounts) {
this.taggedResources = taggedResourceLimitsAndCounts;
}

public void setApiKeyAccess(Boolean apiKeyAccess) {
this.apiKeyAccess = ApiConstants.ApiKeyAccess.fromBoolean(apiKeyAccess);
}

Check warning on line 564 in api/src/main/java/org/apache/cloudstack/api/response/AccountResponse.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/response/AccountResponse.java#L562-L564

Added lines #L562 - L564 were not covered by tests
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,24 @@

import com.google.gson.annotations.SerializedName;

import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponse;

import com.cloud.serializer.Param;

public class RegisterResponse extends BaseResponse {
@SerializedName("apikey")
@SerializedName(ApiConstants.API_KEY)
@Param(description = "the api key of the registered user", isSensitive = true)
private String apiKey;

@SerializedName("secretkey")
@SerializedName(ApiConstants.SECRET_KEY)
@Param(description = "the secret key of the registered user", isSensitive = true)
private String secretKey;

@SerializedName(ApiConstants.API_KEY_ACCESS)
@Param(description = "whether api key access is allowed or not", isSensitive = true)
private Boolean apiKeyAccess;

public String getApiKey() {
return apiKey;
}
Expand All @@ -46,4 +51,8 @@
public void setSecretKey(String secretKey) {
this.secretKey = secretKey;
}

public void setApiKeyAccess(Boolean apiKeyAccess) {
this.apiKeyAccess = apiKeyAccess;
}

Check warning on line 57 in api/src/main/java/org/apache/cloudstack/api/response/RegisterResponse.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/response/RegisterResponse.java#L55-L57

Added lines #L55 - L57 were not covered by tests
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@
@Param(description = "true if user has two factor authentication is mandated", since = "4.18.0.0")
private Boolean is2FAmandated;

@SerializedName(ApiConstants.API_KEY_ACCESS)
@Param(description = "whether api key access is Enabled, Disabled or set to Inherit (it inherits the value from the parent)", since = "4.20.1.0")
ApiConstants.ApiKeyAccess apiKeyAccess;

@Override
public String getObjectId() {
return this.getId();
Expand Down Expand Up @@ -309,4 +313,8 @@
public void set2FAmandated(Boolean is2FAmandated) {
this.is2FAmandated = is2FAmandated;
}

public void setApiKeyAccess(Boolean apiKeyAccess) {
this.apiKeyAccess = ApiConstants.ApiKeyAccess.fromBoolean(apiKeyAccess);
}

Check warning on line 319 in api/src/main/java/org/apache/cloudstack/api/response/UserResponse.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/response/UserResponse.java#L317-L319

Added lines #L317 - L319 were not covered by tests
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.util.List;

import org.apache.cloudstack.affinity.AffinityGroupResponse;
import org.apache.cloudstack.api.ResponseObject;
import org.apache.cloudstack.api.command.admin.domain.ListDomainsCmd;
import org.apache.cloudstack.api.command.admin.host.ListHostTagsCmd;
import org.apache.cloudstack.api.command.admin.host.ListHostsCmd;
Expand Down Expand Up @@ -130,7 +131,7 @@ public interface QueryService {
ConfigKey<Boolean> ReturnVmStatsOnVmList = new ConfigKey<>("Advanced", Boolean.class, "list.vm.default.details.stats", "true",
"Determines whether VM stats should be returned when details are not explicitly specified in listVirtualMachines API request. When false, details default to [group, nics, secgrp, tmpl, servoff, diskoff, backoff, iso, volume, min, affgrp]. When true, all details are returned including 'stats'.", true, ConfigKey.Scope.Global);

ListResponse<UserResponse> searchForUsers(ListUsersCmd cmd) throws PermissionDeniedException;
ListResponse<UserResponse> searchForUsers(ResponseObject.ResponseView responseView, ListUsersCmd cmd) throws PermissionDeniedException;

ListResponse<UserResponse> searchForUsers(Long domainId, boolean recursive) throws PermissionDeniedException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
import com.cloud.upgrade.dao.Upgrade41810to41900;
import com.cloud.upgrade.dao.Upgrade41900to41910;
import com.cloud.upgrade.dao.Upgrade41910to42000;
import com.cloud.upgrade.dao.Upgrade42000to42010;
import com.cloud.upgrade.dao.Upgrade420to421;
import com.cloud.upgrade.dao.Upgrade421to430;
import com.cloud.upgrade.dao.Upgrade430to440;
Expand Down Expand Up @@ -230,6 +231,7 @@ public DatabaseUpgradeChecker() {
.next("4.18.1.0", new Upgrade41810to41900())
.next("4.19.0.0", new Upgrade41900to41910())
.next("4.19.1.0", new Upgrade41910to42000())
.next("4.20.0.0", new Upgrade42000to42010())
.build();
}

Expand Down
Loading
Loading