Class DefaultUserOperationService
java.lang.Object
com.broadleafcommerce.auth.resource.service.DefaultUserOperationService
- All Implemented Interfaces:
UserOperationService
- Author:
- Nick Crum (ncrum)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindAllByScopeIn
(Collection<String> scopes) Finds all user operations tied to the provided set of scopes.protected AccountIdAccessTokenEnhancer
protected AccountAncestorService
getAllUserAuthoritiesForAccount
(String accountId) protected PermissionRepository
getUserOperationInformation
(Collection<String> scopes) Finds theUserOperationInformation
for the current user and the given scopes.getUserOperationInformation
(Collection<String> scopes, String accountId) Finds theUserOperationInformation
for the current user and the given scopes by mapping their roles via the current user's account information.protected UserRoleService<UserRole>
void
setAccessTokenEnhancer
(AccountIdAccessTokenEnhancer accessTokenEnhancer) void
setAccountAncestorService
(AccountAncestorService accountAncestorService) void
setUserRoleService
(UserRoleService<UserRole> userRoleService)
-
Constructor Details
-
DefaultUserOperationService
-
-
Method Details
-
getUserOperationInformation
Description copied from interface:UserOperationService
Finds theUserOperationInformation
for the current user and the given scopes.- Specified by:
getUserOperationInformation
in 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:UserOperationService
Finds theUserOperationInformation
for the current user and the given scopes by mapping their roles via the current user's account information.- Specified by:
getUserOperationInformation
in 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:UserOperationService
Finds all user operations tied to the provided set of scopes.- Specified by:
findAllByScopeIn
in 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)
-