Class DenyAllPermissionEvaluator
- java.lang.Object
-
- org.springframework.security.access.expression.DenyAllPermissionEvaluator
-
- All Implemented Interfaces:
org.springframework.aop.framework.AopInfrastructureBean
,PermissionEvaluator
public class DenyAllPermissionEvaluator extends java.lang.Object implements PermissionEvaluator
A null PermissionEvaluator which denies all access. Used by default for situations when permission evaluation should not be required.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description DenyAllPermissionEvaluator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasPermission(Authentication authentication, java.io.Serializable targetId, java.lang.String targetType, java.lang.Object permission)
Alternative method for evaluating a permission where only the identifier of the target object is available, rather than the target instance itself.boolean
hasPermission(Authentication authentication, java.lang.Object target, java.lang.Object permission)
-
-
-
Method Detail
-
hasPermission
public boolean hasPermission(Authentication authentication, java.lang.Object target, java.lang.Object permission)
- Specified by:
hasPermission
in interfacePermissionEvaluator
- Parameters:
authentication
- represents the user in question. Should not be null.target
- the domain object for which permissions should be checked. May be null in which case implementations should return false, as the null condition can be checked explicitly in the expression.permission
- a representation of the permission object as supplied by the expression system. Not null.- Returns:
- false always
-
hasPermission
public boolean hasPermission(Authentication authentication, java.io.Serializable targetId, java.lang.String targetType, java.lang.Object permission)
Description copied from interface:PermissionEvaluator
Alternative method for evaluating a permission where only the identifier of the target object is available, rather than the target instance itself.- Specified by:
hasPermission
in interfacePermissionEvaluator
- Parameters:
authentication
- represents the user in question. Should not be null.targetId
- the identifier for the object instance (usually a Long)targetType
- a String representing the target's type (usually a Java classname). Not null.permission
- a representation of the permission object as supplied by the expression system. Not null.- Returns:
- false always
-
-