@Component public class SecurityHelper extends Object
| Constructor and Description |
|---|
SecurityHelper() |
| Modifier and Type | Method and Description |
|---|---|
Set<org.springframework.security.core.GrantedAuthority> |
getUnrestrictedFunctions()
Retrieves functional points that have no roles mapped to them.
|
boolean |
isSecurityEnabled(javax.servlet.http.HttpServletRequest request)
Checks whether security is enabled based on SpEL expression defined in environment.
|
boolean |
isUserGeneratedByClass(org.springframework.security.core.Authentication authentication,
Class<?> generatedByClass)
Checks whether the user was generated by.
|
Set<org.springframework.security.core.GrantedAuthority> |
mapRolesToFunctions(Collection<String> roles)
Maps the given collection of roles to functional points.
|
public Set<org.springframework.security.core.GrantedAuthority> getUnrestrictedFunctions()
GrantedAuthority representing functional pointspublic boolean isSecurityEnabled(javax.servlet.http.HttpServletRequest request)
request - HttpServletRequest to determine whether security is enabled.public boolean isUserGeneratedByClass(org.springframework.security.core.Authentication authentication,
Class<?> generatedByClass)
authentication - the Authentication containing the user object.generatedByClass - the class to check that the user was generated by.public Set<org.springframework.security.core.GrantedAuthority> mapRolesToFunctions(Collection<String> roles)
roles - - the collection of roles to map to functions.GrantedAuthority representing functional points.Copyright © 2019. All rights reserved.