public abstract class SecurityExpressionRoot extends Object implements SecurityExpressionOperations
Modifier and Type | Field and Description |
---|---|
String |
admin |
protected Authentication |
authentication |
String |
create |
String |
delete |
boolean |
denyAll
Allows "denyAll" expression
|
boolean |
permitAll
Allows "permitAll" expression
|
String |
read |
String |
write |
Constructor and Description |
---|
SecurityExpressionRoot(Authentication a) |
Modifier and Type | Method and Description |
---|---|
boolean |
denyAll() |
Authentication |
getAuthentication() |
Object |
getPrincipal() |
boolean |
hasAnyAuthority(String... authorities) |
boolean |
hasAnyRole(String... roles) |
boolean |
hasAuthority(String authority) |
boolean |
hasPermission(Object target,
Object permission) |
boolean |
hasPermission(Object targetId,
String targetType,
Object permission) |
boolean |
hasRole(String role) |
boolean |
isAnonymous() |
boolean |
isAuthenticated() |
boolean |
isFullyAuthenticated() |
boolean |
isRememberMe() |
boolean |
permitAll() |
void |
setPermissionEvaluator(PermissionEvaluator permissionEvaluator) |
void |
setRoleHierarchy(RoleHierarchy roleHierarchy) |
void |
setTrustResolver(AuthenticationTrustResolver trustResolver) |
protected final Authentication authentication
public final boolean permitAll
public final boolean denyAll
public final String read
public final String write
public final String create
public final String delete
public final String admin
public SecurityExpressionRoot(Authentication a)
public final boolean hasAuthority(String authority)
hasAuthority
in interface SecurityExpressionOperations
public final boolean hasAnyAuthority(String... authorities)
hasAnyAuthority
in interface SecurityExpressionOperations
public final boolean hasRole(String role)
hasRole
in interface SecurityExpressionOperations
public final boolean hasAnyRole(String... roles)
hasAnyRole
in interface SecurityExpressionOperations
public final Authentication getAuthentication()
getAuthentication
in interface SecurityExpressionOperations
public final boolean permitAll()
permitAll
in interface SecurityExpressionOperations
public final boolean denyAll()
denyAll
in interface SecurityExpressionOperations
public final boolean isAnonymous()
isAnonymous
in interface SecurityExpressionOperations
public final boolean isAuthenticated()
isAuthenticated
in interface SecurityExpressionOperations
public final boolean isRememberMe()
isRememberMe
in interface SecurityExpressionOperations
public final boolean isFullyAuthenticated()
isFullyAuthenticated
in interface SecurityExpressionOperations
public Object getPrincipal()
public void setTrustResolver(AuthenticationTrustResolver trustResolver)
public void setRoleHierarchy(RoleHierarchy roleHierarchy)
public boolean hasPermission(Object target, Object permission)
hasPermission
in interface SecurityExpressionOperations
public boolean hasPermission(Object targetId, String targetType, Object permission)
hasPermission
in interface SecurityExpressionOperations
public void setPermissionEvaluator(PermissionEvaluator permissionEvaluator)