Package com.hybris.backoffice.user
Class BackofficeUserService
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.service.AbstractService
-
- de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
-
- de.hybris.platform.servicelayer.user.impl.DefaultUserService
-
- com.hybris.backoffice.user.BackofficeUserService
-
- All Implemented Interfaces:
UserService,java.io.Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
public class BackofficeUserService extends DefaultUserService
Backoffice implementation of theUserService. Considers the active role when checking if the user is an administrator.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBACKOFFICE_ADMIN_GROUP-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManager
-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant
-
-
Constructor Summary
Constructors Constructor Description BackofficeUserService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BackofficeRoleServicegetBackofficeRoleService()booleanisAdmin(UserModel user)Checks if the given user has the admin role.protected booleanisAdminGroup(java.lang.String groupId)protected booleanisAdminGroupInActiveRoleHierarchy()protected booleanisAdminGroupInNonRoleHierarchy(UserModel user)protected booleanisCurrentUser(UserModel user)voidsetBackofficeRoleService(BackofficeRoleService backofficeRoleService)-
Methods inherited from class de.hybris.platform.servicelayer.user.impl.DefaultUserService
assurePasswordCompliance, getAdminUser, getAdminUserGroup, getAllTitles, getAllUserGroupsForUser, getAllUserGroupsForUser, getAllUserGroupsForUserGroup, getAnonymousUser, getCurrentUser, getDefaultPasswordEncoding, getPassword, getPassword, getRealEncoding, getTitleForCode, getUser, getUserAudits, getUserForUID, getUserForUID, getUserGroup, getUserGroupForUID, getUserGroupForUID, isAdminEmployee, isAdminGroup, isAnonymousUser, isMemberOfGroup, isMemberOfGroup, isMemberOfGroup, isMemberOfGroup, isPasswordIdenticalToAudited, isUserExisting, setCurrentUser, setDefaultPasswordEncoding, setEncodedPassword, setEncodedPassword, setEventService, setPassword, setPassword, setPassword, setPassword, setPasswordEncoderService, setPasswordPolicyService, setPasswordWithDefaultEncoding, setSearchRestrictionService, setTitleDao, setUserAuditDao, setUserDao, setUserGroupDao
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManager
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
-
-
-
Field Detail
-
BACKOFFICE_ADMIN_GROUP
public static final java.lang.String BACKOFFICE_ADMIN_GROUP
- See Also:
- Constant Field Values
-
-
Method Detail
-
isAdmin
public boolean isAdmin(UserModel user)
Description copied from interface:UserServiceChecks if the given user has the admin role.The user is an admin if either the user is the admin employee or the user is a member of the admin user group (see
UserService.getAdminUserGroup()).- Specified by:
isAdminin interfaceUserService- Overrides:
isAdminin classDefaultUserService- Parameters:
user- user to check- Returns:
trueif the user is an admin, otherwisefalse
-
isCurrentUser
protected boolean isCurrentUser(UserModel user)
-
isAdminGroupInActiveRoleHierarchy
protected boolean isAdminGroupInActiveRoleHierarchy()
-
isAdminGroupInNonRoleHierarchy
protected boolean isAdminGroupInNonRoleHierarchy(UserModel user)
-
isAdminGroup
protected boolean isAdminGroup(java.lang.String groupId)
-
getBackofficeRoleService
protected BackofficeRoleService getBackofficeRoleService()
-
setBackofficeRoleService
public void setBackofficeRoleService(BackofficeRoleService backofficeRoleService)
-
-