Skip to content

Commit

Permalink
Service/Attributes bug on Handling new account put rest request
Browse files Browse the repository at this point in the history
Signed-off-by: Sam <[email protected]>
  • Loading branch information
samuelcostae committed Sep 22, 2023
1 parent 34a90dd commit d887b40
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ ValidationResult<SecurityConfiguration> createOrUpdateAccount(
try {
final var username = securityConfiguration.entityName();
final var content = (ObjectNode) securityConfiguration.requestContent();
if (request.hasParam("service")) {
content.put("service", request.param("service"));
if (request.hasParam("attributes")) {
content.put("attributes", request.param("attributes"));
}
if (request.hasParam("enabled")) {
content.put("enabled", request.param("enabled"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;

public class UserServiceUnitTests<T> {
public class UserServiceUnitTests {
SecurityDynamicConfiguration<?> config;
@Mock
ClusterService clusterService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ protected String getEndpointPrefix() {

private static final String ENABLED_SERVICE_ACCOUNT_BODY = "{"
+ " \"attributes\": { \"service\": \"true\", "
+ " \"enabled \": \"true\"},"
+ " \"service\": \"true\" "
+ " \"enabled \": \"true\"}"
+ " }\n";

private static final String DISABLED_SERVICE_ACCOUNT_BODY = "{"
Expand Down

0 comments on commit d887b40

Please sign in to comment.