|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
interface SecurityBridge
Interface that plugin must implement to provide security information
Method Summary | |
---|---|
java.util.Map
|
createLink(java.lang.String action)
Create a link to the specified security action |
java.lang.String
|
getProviderName()
Implementations must return the name of their security provider |
java.lang.String
|
getUserIdentity()
Get user id string i.e. |
java.lang.Object
|
getUserInfo()
Get user info object containing i.e. email address, other stuff defined by the security implementation |
boolean
|
userExists(java.lang.Object identity)
Determine whether a user with the given id already exists or not |
boolean
|
userHasRole(java.lang.Object role)
Return true if the current logged in user has the specified role |
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 code masquerading as the specified user, for the duration of the Closure block |
Method Detail |
---|
java.util.Map createLink(java.lang.String action)
action
- One of "login", "logout", "signup"
java.lang.String getProviderName()
java.lang.String getUserIdentity()
java.lang.Object getUserInfo()
boolean userExists(java.lang.Object identity)
boolean userHasRole(java.lang.Object 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