Skip to content

Commit

Permalink
Change roles to pull from db
Browse files Browse the repository at this point in the history
  • Loading branch information
beckje01 authored and fpanwaskar committed Mar 13, 2013
1 parent 18b6f77 commit 436471d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ class SpringSamlUserDetailsService extends GormUserDetailsService implements SAM

def grantedAuthorities = []
if (samlAutoCreateActive) {
user = saveUser(user.class, user, authorities).merge()
user.getAuthorities().each { authority ->
user = saveUser(user.class, user, authorities)

Class<?> UserClass = grailsApplication.getDomainClass(userDomainClassName)?.clazz
def dbUser = UserClass.get(user.id)

dbUser.getAuthorities().each { authority ->
grantedAuthorities.add(new GrantedAuthorityImpl(authority."$authorityNameField"))

}
Expand Down

0 comments on commit 436471d

Please sign in to comment.