Skip to content

Commit

Permalink
Merge pull request #221 from integratedmodelling/IM-536-Bug-with-ROLE…
Browse files Browse the repository at this point in the history
…_USER-in-mongo

Im 536 bug with role user in mongo
  • Loading branch information
kristinaBc3 authored Jan 15, 2025
2 parents fe487e8 + 7dc299f commit 5593772
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.List;
import java.util.Optional;

import org.integratedmodelling.klab.auth.Role;
import org.integratedmodelling.klab.hub.agreements.dto.Agreement;
import org.integratedmodelling.klab.hub.agreements.dto.AgreementEntry;
import org.integratedmodelling.klab.hub.agreements.services.AgreementService;
Expand Down Expand Up @@ -56,6 +57,7 @@ public User registerNewUser(String username, String email) {
User newUser = new User();
newUser.setUsername(username);
newUser.setEmail(email);
newUser.addRoles(Role.ROLE_USER);
newUser = new CreateUser(userRepository, newUser, AccountStatus.active).execute();
publisher.publish(new NewUserAdded(new Object(), newUser));
return newUser;
Expand Down

0 comments on commit 5593772

Please sign in to comment.