Class DefaultUIAccessRightService
java.lang.Object
de.hybris.platform.cockpit.services.impl.AbstractServiceImpl
de.hybris.platform.cockpit.services.security.impl.DefaultUIAccessRightService
- All Implemented Interfaces:
UIAccessRightService
- Direct Known Subclasses:
BundleUIAccessRightService,CMSCockpitUIAccessRightService
public class DefaultUIAccessRightService
extends AbstractServiceImpl
implements UIAccessRightService
Default implementation of the ui access right service.
-
Field Summary
FieldsFields inherited from class de.hybris.platform.cockpit.services.impl.AbstractServiceImpl
modelService, typeService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether a specific user has read access to a specific Cockpit component or not.booleancanWrite(UserModel user, CatalogVersionModel catVersion) Returns whether a specific user has write access to a specific catalog version or not.booleanReturns whether a specific user has write access to a specific Cockpit component or not.protected StringgetBaseTypeCode(ObjectType type, ItemAttributePropertyDescriptor descr) protected SessionContextbooleanisReadable(ObjectType type) Returns whether the current user has read access to the specified type.booleanisReadable(ObjectType type, PropertyDescriptor propDescr, boolean creationMode) Returns whether the current user has read access to the specified property.booleanisWritable(ObjectType type) Returns whether the current user has write access to the specified type.booleanisWritable(ObjectType type, PropertyDescriptor propDescr, boolean creationMode) Returns whether the current user has write access to the specified item property.booleanisWritable(ObjectType type, TypedObject item) Returns whether the current user has write access to the specified item.booleanisWritable(ObjectType type, TypedObject item, PropertyDescriptor propDescr, boolean creationMode) Returns whether the current user has write access to the specified item property.protected booleanrestricts(Collection<PrincipalModel> principals, UserModel user) voidsetCockpitUIComponentAccessRightDao(CockpitUIComponentAccessRightDao cockpitUIComponentAccessRightDao) voidsetSystemService(SystemService systemService) voidsetUserService(UserService userService) Methods inherited from class de.hybris.platform.cockpit.services.impl.AbstractServiceImpl
getEnum, getEnums, getLocalizedLabel, getLocalizedLabel, getModelService, getTypeService, setCockpitTypeService, setLabelResolver, setModelService
-
Field Details
-
cockpitUIComponentAccessRightDao
-
-
Constructor Details
-
DefaultUIAccessRightService
public DefaultUIAccessRightService()
-
-
Method Details
-
canRead
Description copied from interface:UIAccessRightServiceReturns whether a specific user has read access to a specific Cockpit component or not.- Specified by:
canReadin interfaceUIAccessRightService- Parameters:
user- the user to check access forcomponentCode- the unique code of the component- Returns:
trueif the user has read access to the specified component, otherwisefalse
-
canWrite
Description copied from interface:UIAccessRightServiceReturns whether a specific user has write access to a specific Cockpit component or not.- Specified by:
canWritein interfaceUIAccessRightService- Parameters:
user- the user to check access forcomponentCode- the unique code of the component- Returns:
trueif the user has write access to the specified component, otherwisefalse
-
restricts
-
setCockpitUIComponentAccessRightDao
public void setCockpitUIComponentAccessRightDao(CockpitUIComponentAccessRightDao cockpitUIComponentAccessRightDao) -
setUserService
-
getUserService
-
isReadable
Description copied from interface:UIAccessRightServiceReturns whether the current user has read access to the specified type.- Specified by:
isReadablein interfaceUIAccessRightService- Parameters:
type- the type to check access for- Returns:
trueif user has read access,falseotherwise
-
isReadable
Description copied from interface:UIAccessRightServiceReturns whether the current user has read access to the specified property.- Specified by:
isReadablein interfaceUIAccessRightService- Parameters:
type- item typepropDescr- item attribute to check access forcreationMode- creation mode or not- Returns:
trueif user has read access,falseotherwise
-
isWritable
Description copied from interface:UIAccessRightServiceReturns whether the current user has write access to the specified type.- Specified by:
isWritablein interfaceUIAccessRightService- Parameters:
type- the type to check access for- Returns:
trueif user has write access,falseotherwise
-
isWritable
Description copied from interface:UIAccessRightServiceReturns whether the current user has write access to the specified item.- Specified by:
isWritablein interfaceUIAccessRightService- Parameters:
type- item typeitem- the item instance to check access for- Returns:
trueif user has write access,falseotherwise
-
isWritable
public boolean isWritable(ObjectType type, TypedObject item, PropertyDescriptor propDescr, boolean creationMode) Description copied from interface:UIAccessRightServiceReturns whether the current user has write access to the specified item property.- Specified by:
isWritablein interfaceUIAccessRightService- Parameters:
type- item typeitem- item instancepropDescr- item attribute to check access forcreationMode- creation mode or not- Returns:
trueif user has write access,falseotherwise
-
isWritable
Description copied from interface:UIAccessRightServiceReturns whether the current user has write access to the specified item property.- Specified by:
isWritablein interfaceUIAccessRightService- Parameters:
type- item typepropDescr- item attribute to check access forcreationMode- creation mode or not- Returns:
trueif user has write access,falseotherwise
-
getBaseTypeCode
-
setSystemService
-
getSystemService
-
canWrite
Description copied from interface:UIAccessRightServiceReturns whether a specific user has write access to a specific catalog version or not.- Specified by:
canWritein interfaceUIAccessRightService- Parameters:
user- the user to check access forcatVersion- the catalog version- Returns:
trueif the user has write access,falseotherwise
-
getSessionContext
-