Class ApplicationSecurityUtil
java.lang.Object
com.broadleafcommerce.tenant.service.ApplicationSecurityUtil
Utility methods to read a user's available applications.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionApplicationSecurityUtil
(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils
boolean
hasAccessToApplication
(String applicationId) Return true if the user has access to the application ID supplied, else false.boolean
Returns whether this user has all application access.Read the IDs of the applications this user has access to.
-
Field Details
-
TENANT_ACCESS_KEY
- See Also:
-
APPLICATION_ACCESS_KEY
- See Also:
-
APPLICATION_ID_KEY
- See Also:
-
-
Constructor Details
-
ApplicationSecurityUtil
public ApplicationSecurityUtil(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils)
-
-
Method Details
-
hasAccessToApplication
Return true if the user has access to the application ID supplied, else false.- Parameters:
applicationId
- The application id- Returns:
- true if the user has access to the application ID, else false.
-
readUserAccessibleApplicationIds
Read the IDs of the applications this user has access to.- Returns:
- The applications the user has access to.
-
hasFullApplicationAccess
public boolean hasFullApplicationAccess()Returns whether this user has all application access. All application access is denoted by an absence of application restrictions.- Returns:
- true if the user has access to all applications, else false.
-
readApplicationIds
-
getAuthenticationUtils
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthenticationUtils()
-