Skip to content

Commit

Permalink
[SHIBUI-1030]
Browse files Browse the repository at this point in the history
Updated test to persist roles before users.
  • Loading branch information
Bill Smith committed Jan 17, 2019
1 parent d5d7ad7 commit f3b48a9
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class UserBootstrap {
new CSVReader(new InputStreamReader(shibUIConfiguration.userBootstrapResource.inputStream)).each { it ->
def (username, password, firstName, lastName, roleName) = it
def role = roleRepository.findByName(roleName).orElse(new Role(name: roleName))
roleRepository.saveAndFlush(role)
def user = userRepository.findByUsername(username).orElse(new User(username: username)).with {
it.password = password
it.firstName = firstName
Expand Down

0 comments on commit f3b48a9

Please sign in to comment.