Class SupportUserLoginServiceImpl
java.lang.Object
ch.tocco.nice2.usermanager.impl.SupportUserLoginServiceImpl
- All Implemented Interfaces:
SupportUserLoginService
@Component
public class SupportUserLoginServiceImpl
extends Object
implements SupportUserLoginService
-
Constructor Summary
ConstructorsConstructorDescriptionSupportUserLoginServiceImpl(PersistenceService persistenceService, QueryBuilderFactory queryBuilderFactory, SecurityManager securityManager, ScriptListenerService scriptListenerService, EntityDefaultValueService entityDefaultValueService, org.slf4j.Logger log) -
Method Summary
Modifier and TypeMethodDescriptioncreateOrUpdateLogin(String username, Consumer<Entity> principalAdjuster) Creates a login with the given username or updates the existing one: it is linked to the support user, gets a business unit if required and is activated.voidlinkAllRoles(String username) Gives the login every role in the null business unit.voidLikeSupportUserLoginService.linkAllRoles(String), but only for the roles with the given unique ids, and the login loses every other role.
-
Constructor Details
-
SupportUserLoginServiceImpl
public SupportUserLoginServiceImpl(PersistenceService persistenceService, QueryBuilderFactory queryBuilderFactory, SecurityManager securityManager, ScriptListenerService scriptListenerService, EntityDefaultValueService entityDefaultValueService, org.slf4j.Logger log)
-
-
Method Details
-
createOrUpdateLogin
Description copied from interface:SupportUserLoginServiceCreates a login with the given username or updates the existing one: it is linked to the support user, gets a business unit if required and is activated.- Specified by:
createOrUpdateLoginin interfaceSupportUserLoginService- Parameters:
principalAdjuster- sets login specific fields, called in the same transaction before the defaults are set- Returns:
- empty if there is no support user
-
linkAllRoles
Description copied from interface:SupportUserLoginServiceGives the login every role in the null business unit. Business unit specific login roles are replaced.- Specified by:
linkAllRolesin interfaceSupportUserLoginService
-
setRoles
Description copied from interface:SupportUserLoginServiceLikeSupportUserLoginService.linkAllRoles(String), but only for the roles with the given unique ids, and the login loses every other role. Unknown roles are skipped with a warning.- Specified by:
setRolesin interfaceSupportUserLoginService
-