Class AccessRestrictionExpressionRoot
java.lang.Object
org.craftercms.security.utils.spring.el.AccessRestrictionExpressionRoot
Instances of this class are used as the root object for Spring EL
Expressions that are used to evaluate
access restrictions.- Author:
- Alfonso Vásquez
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandenyAll()Always returns false (deny access to everyone).booleanhasAnyRole(Collection<String> roles) Returns trues if the profile has any of the specified roles.booleanReturns trues if the profile has the specified role.booleanReturns trues if user is anonymous.booleanReturns trues if user is authenticated.booleanAlways returns true (allow access to everyone).voidsetProfile(Profile profile)
-
Constructor Details
-
AccessRestrictionExpressionRoot
public AccessRestrictionExpressionRoot()
-
-
Method Details
-
setProfile
-
isAnonymous
public boolean isAnonymous()Returns trues if user is anonymous. -
isAuthenticated
public boolean isAuthenticated()Returns trues if user is authenticated. -
hasRole
Returns trues if the profile has the specified role. -
hasAnyRole
Returns trues if the profile has any of the specified roles. -
permitAll
public boolean permitAll()Always returns true (allow access to everyone). -
denyAll
public boolean denyAll()Always returns false (deny access to everyone).
-