src.groovy.org.codehaus.groovy.grails.plugins.springsecurity
Class AuthorizeTools

Helper methods.

author:
Tsuyoshi Yamamoto

 
Constructor Summary
AuthorizeTools()
           
 
Method Summary
static Set authoritiesToRoles(def authorities)
           Extract the role names from authorities.
static List getPrincipalAuthorities()
           Get the current user's authorities.
static ConfigObject getSecurityConfig()
          
static boolean ifAllGranted(def role)
          
static boolean ifAnyGranted(def role)
          
static boolean ifNotGranted(def role)
          
static Set parseAuthoritiesString(String authorizationsString)
          
static Set retainAll(def granted, def required)
          
static Set rolesToAuthorities(def grantedRoles, def granted)
          
 

Constructor Detail

AuthorizeTools

AuthorizeTools()


Method Detail

authoritiesToRoles

public static Set authoritiesToRoles(def authorities)
Extract the role names from authorities.
param:
authorities the authorities
return:
the names


getPrincipalAuthorities

public static List getPrincipalAuthorities()
Get the current user's authorities.
return:
a list of authorities (empty if not authenticated).


getSecurityConfig

public static ConfigObject getSecurityConfig()


ifAllGranted

public static boolean ifAllGranted(def role)


ifAnyGranted

public static boolean ifAnyGranted(def role)


ifNotGranted

public static boolean ifNotGranted(def role)


parseAuthoritiesString

public static Set parseAuthoritiesString(String authorizationsString)


retainAll

public static Set retainAll(def granted, def required)


rolesToAuthorities

public static Set rolesToAuthorities(def grantedRoles, def granted)