Package africa.absa.inception.api
Class ApiSecurityExpressionRoot
- java.lang.Object
-
- org.springframework.security.access.expression.SecurityExpressionRoot
-
- africa.absa.inception.api.ApiSecurityExpressionRoot
-
- All Implemented Interfaces:
org.springframework.security.access.expression.method.MethodSecurityExpressionOperations,org.springframework.security.access.expression.SecurityExpressionOperations
public class ApiSecurityExpressionRoot extends org.springframework.security.access.expression.SecurityExpressionRoot implements org.springframework.security.access.expression.method.MethodSecurityExpressionOperationsThe ApiSecurityExpressionRoot class implements the custom methods, which can be used in conjunction with the @PreAuthorize annotation.- Author:
- Marcus Portmann
-
-
Constructor Summary
Constructors Constructor Description ApiSecurityExpressionRoot(org.springframework.security.core.Authentication authentication, org.springframework.context.ApplicationContext applicationContext)Constructs a new ApiSecurityExpressionRoot.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetFilterObject()ObjectgetReturnObject()ObjectgetThis()booleanisSecurityDisabled()Returns whether security is disabled.booleanisSecurityEnabled()Returns whether security is enabled.voidsetFilterObject(Object filterObject)voidsetReturnObject(Object returnObject)-
Methods inherited from class org.springframework.security.access.expression.SecurityExpressionRoot
denyAll, getAuthentication, getPrincipal, hasAnyAuthority, hasAnyRole, hasAuthority, hasPermission, hasPermission, hasRole, isAnonymous, isAuthenticated, isFullyAuthenticated, isRememberMe, permitAll, setDefaultRolePrefix, setPermissionEvaluator, setRoleHierarchy, setTrustResolver
-
-
-
-
Constructor Detail
-
ApiSecurityExpressionRoot
public ApiSecurityExpressionRoot(org.springframework.security.core.Authentication authentication, org.springframework.context.ApplicationContext applicationContext)Constructs a new ApiSecurityExpressionRoot.- Parameters:
authentication- the authenticationapplicationContext- the Spring application context
-
-
Method Detail
-
getFilterObject
public Object getFilterObject()
- Specified by:
getFilterObjectin interfaceorg.springframework.security.access.expression.method.MethodSecurityExpressionOperations
-
getReturnObject
public Object getReturnObject()
- Specified by:
getReturnObjectin interfaceorg.springframework.security.access.expression.method.MethodSecurityExpressionOperations
-
getThis
public Object getThis()
- Specified by:
getThisin interfaceorg.springframework.security.access.expression.method.MethodSecurityExpressionOperations
-
isSecurityDisabled
public boolean isSecurityDisabled()
Returns whether security is disabled.- Returns:
- true if security is disabled or false otherwise
-
isSecurityEnabled
public boolean isSecurityEnabled()
Returns whether security is enabled.- Returns:
- true if security is enabled or false otherwise
-
setFilterObject
public void setFilterObject(Object filterObject)
- Specified by:
setFilterObjectin interfaceorg.springframework.security.access.expression.method.MethodSecurityExpressionOperations
-
setReturnObject
public void setReturnObject(Object returnObject)
- Specified by:
setReturnObjectin interfaceorg.springframework.security.access.expression.method.MethodSecurityExpressionOperations
-
-