Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,14 @@ class User implements UserDetails {

@Override
Collection<? extends GrantedAuthority> getAuthorities() {
roles.split('').collect { new SimpleGrantedAuthority(it) }
if (!roles) {
return []
}
roles
.split(',')
.collect { it.trim() }
.findAll { it }
.collect { new SimpleGrantedAuthority(it) }
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import grails.testing.mixin.integration.Integration
class UserCommunityControllerSpec extends ContainerGebSpec {

void setup() {
clearCookiesQuietly()
to(LoginPage).login()
Comment thread
jamesfredley marked this conversation as resolved.
}

Expand All @@ -47,4 +48,4 @@ class UserCommunityControllerSpec extends ContainerGebSpec {
then:
!page.scaffoldTable
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import grails.testing.mixin.integration.Integration
class UserControllerSpec extends ContainerGebSpec {

void setup() {
clearCookiesQuietly()
to(LoginPage).login()
}

Expand All @@ -47,4 +48,4 @@ class UserControllerSpec extends ContainerGebSpec {
then:
$('table.scaffold')
}
}
}
Loading