Class DefaultUserOperationService
java.lang.Object
com.broadleafcommerce.auth.resource.service.DefaultUserOperationService
- All Implemented Interfaces:
UserOperationService
- Author:
- Nick Crum (ncrum)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindAllByScopeIn(Collection<String> scopes) Finds all user operations tied to the provided set of scopes.protected AccountIdAccessTokenEnhancerprotected AccountAncestorServicegetAllUserAuthoritiesForAccount(String accountId) protected PermissionRepositorygetUserOperationInformation(Collection<String> scopes) Finds theUserOperationInformationfor the current user and the given scopes.getUserOperationInformation(Collection<String> scopes, String accountId) Finds theUserOperationInformationfor the current user and the given scopes by mapping their roles via the current user's account information.protected UserRoleService<UserRole>voidsetAccessTokenEnhancer(AccountIdAccessTokenEnhancer accessTokenEnhancer) voidsetAccountAncestorService(AccountAncestorService accountAncestorService) voidsetUserRoleService(UserRoleService<UserRole> userRoleService)
-
Constructor Details
-
DefaultUserOperationService
-
-
Method Details
-
getUserOperationInformation
Description copied from interface:UserOperationServiceFinds theUserOperationInformationfor the current user and the given scopes.- Specified by:
getUserOperationInformationin interfaceUserOperationService- Parameters:
scopes- the set of scopes to retrieve operation info for- Returns:
- the operation information on the current user for the given scopes
-
safeGetUserAuthoritiesFromCurrentAuthentication
-
getUserOperationInformation
public UserOperationInformation getUserOperationInformation(@NonNull Collection<String> scopes, @NonNull String accountId) Description copied from interface:UserOperationServiceFinds theUserOperationInformationfor the current user and the given scopes by mapping their roles via the current user's account information.- Specified by:
getUserOperationInformationin interfaceUserOperationService- Parameters:
scopes- the set of scopes to retrieve operation info foraccountId- the id to use to check if the current user has permissions for the account- Returns:
- the operation information on the current user for the given scopes
-
findAllByScopeIn
Description copied from interface:UserOperationServiceFinds all user operations tied to the provided set of scopes.- Specified by:
findAllByScopeInin interfaceUserOperationService- Parameters:
scopes- the set of scopes to retrieve operations for- Returns:
- all `UserOperation` matching at least one of the scopes
-
getAllUserAuthoritiesForAccount
-
getPermissionRepository
-
getUserRoleService
-
setUserRoleService
-
getAccessTokenEnhancer
-
setAccessTokenEnhancer
@Autowired @Lazy public void setAccessTokenEnhancer(AccountIdAccessTokenEnhancer accessTokenEnhancer) -
getAccountAncestorService
-
setAccountAncestorService
@Autowired @Lazy public void setAccountAncestorService(AccountAncestorService accountAncestorService)
-