Skip to content

Commit

Permalink
HELLODATA-1881 - disable mfa
Browse files Browse the repository at this point in the history
  • Loading branch information
Slawomir Wieczorek committed Jan 13, 2025
1 parent c25e44b commit 756eb36
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,17 @@ public User createUser(String email, String username, String password) {
permissions.put("/", List.of(STAR));
user.permissions(permissions);

UserFilters filters = new UserFilters();
filters.setWebClient(List.of(WebClientOptions.MFA_DISABLED));
user.setFilters(filters);

User createdUser = usersApi.addUser(user, 0).block();
usersApi.disableUser2fa(username).block();
log.info("User {} created", username);
if (createdUser != null) {
usersApi.disableUser2fa(createdUser.getUsername()).block();
log.info("User {} created", username);
} else {
log.info("User {} not created", username);
}
return createdUser;
}

Expand Down

0 comments on commit 756eb36

Please sign in to comment.