Class AccessRestrictionExpressionRoot
- java.lang.Object
-
- org.craftercms.security.utils.spring.el.AccessRestrictionExpressionRoot
-
public class AccessRestrictionExpressionRoot extends Object
Instances of this class are used as the root object for Spring ELExpressions that are used to evaluate access restrictions.- Author:
- Alfonso Vásquez
-
-
Constructor Summary
Constructors Constructor Description AccessRestrictionExpressionRoot()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandenyAll()Always returns false (deny access to everyone).booleanhasAnyRole(Collection<String> roles)Returns trues if the profile has any of the specified roles.booleanhasRole(String role)Returns trues if the profile has the specified role.booleanisAnonymous()Returns trues if user is anonymous.booleanisAuthenticated()Returns trues if user is authenticated.booleanpermitAll()Always returns true (allow access to everyone).voidsetProfile(Profile profile)
-
-
-
Method Detail
-
setProfile
public void setProfile(Profile profile)
-
isAnonymous
public boolean isAnonymous()
Returns trues if user is anonymous.
-
isAuthenticated
public boolean isAuthenticated()
Returns trues if user is authenticated.
-
hasRole
public boolean hasRole(String role)
Returns trues if the profile has the specified role.
-
hasAnyRole
public boolean hasAnyRole(Collection<String> roles)
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).
-
-