| 
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD | |||||||
interface Security
Bean for registering and accessing security information A security-provider plugin must be installed
| Method Summary | |
|---|---|
            java.util.Map
         | 
        
            createLink(java.lang.String action)
            Create a link to the specified security action  | 
        
            java.lang.String
         | 
        
            getUserIdentity()
            Get user id string i.e.  | 
        
            java.lang.Object
         | 
        
            getUserInfo()
            Get user info object i.e. email address, other stuff defined by the security implementation  | 
        
            boolean
         | 
        
            hasProvider()
             | 
        
            java.lang.Object
         | 
        
            ifUserHasRole(java.lang.Object role, groovy.lang.Closure code)
             | 
        
            java.lang.Object
         | 
        
            ifUserIsAllowed(java.lang.Object object, java.lang.Object action, groovy.lang.Closure code)
            Can the current user access this object to perform the named action?  | 
        
            java.lang.Object
         | 
        
            requirePermission(java.lang.Object object, java.lang.Object action, groovy.lang.Closure code)
            Run the closure if userIsAllowed returns true for the object and action otherwise throw exception  | 
        
            boolean
         | 
        
            userExists(java.lang.Object identity)
            Determine whether a user with the given id already exists or not  | 
        
            boolean
         | 
        
            userHasAllRoles(java.lang.Object roleOrRoles)
            Test if the user has all the listed roles  | 
        
            boolean
         | 
        
            userHasAnyRole(java.lang.Object roleOrRoles)
            Test if the user has any of the listed roles  | 
        
            boolean
         | 
        
            userIsAllowed(java.lang.Object object, java.lang.Object action)
            Can the current user access this object to perform the named action?  | 
        
            java.lang.Object
         | 
        
            withUser(java.lang.Object identity, groovy.lang.Closure code)
            Execute the closure pretending to be the user id specified  | 
        
| Method Detail | 
|---|
java.util.Map createLink(java.lang.String action)
action -  One of "login", "logout", "signup"
java.lang.String getUserIdentity()
java.lang.Object getUserInfo()
boolean hasProvider()
java.lang.Object ifUserHasRole(java.lang.Object role, groovy.lang.Closure code)
java.lang.Object ifUserIsAllowed(java.lang.Object object, java.lang.Object action, groovy.lang.Closure code)
object -  The object, typically domain but we don't care whataction -  Some application-defined action string i.e. "view" or "edit"
java.lang.Object requirePermission(java.lang.Object object, java.lang.Object action, groovy.lang.Closure code)
boolean userExists(java.lang.Object identity)
boolean userHasAllRoles(java.lang.Object roleOrRoles)
roleOrRoles -  A list of roles or a single role
boolean userHasAnyRole(java.lang.Object roleOrRoles)
roleOrRoles -  A list of roles or a single role
boolean userIsAllowed(java.lang.Object object, java.lang.Object action)
object -  The object, typically domain but we don't care whataction -  Some application-defined action string i.e. "view" or "edit"
java.lang.Object withUser(java.lang.Object identity, groovy.lang.Closure code)
Groovy Documentation