|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springmodules.validation.valang.functions.AbstractFunction
org.springmodules.validation.valang.functions.InRoleFunction
public class InRoleFunction
A function that accepts a one string argument that indicates a security role. This function
returns a true if the current user is in the passed in role, and false
otherwise.
This method uses Acegi's SecurityContextHolder.getContext().getAuthentication() to
get the current user.
This function may be used to apply different validation rules based on the logged in user roles.
| Constructor Summary | |
|---|---|
InRoleFunction(Function[] arguments,
int line,
int column)
|
|
| Method Summary | |
|---|---|
protected java.lang.Object |
doGetResult(java.lang.Object target)
|
| Methods inherited from class org.springmodules.validation.valang.functions.AbstractFunction |
|---|
definedExactNumberOfArguments, definedMaxNumberOfArguments, definedMinNumberOfArguments, getArguments, getResult, getTemplate, init, isAutowireByName, isAutowireByType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InRoleFunction(Function[] arguments,
int line,
int column)
| Method Detail |
|---|
protected java.lang.Object doGetResult(java.lang.Object target)
doGetResult in class AbstractFunction
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||