Class DefaultWidgetAuthorizationService
- java.lang.Object
-
- com.hybris.cockpitng.core.security.impl.DefaultWidgetAuthorizationService
-
- All Implemented Interfaces:
WidgetAuthorizationService
- Direct Known Subclasses:
AdminWidgetAuthorizationService
public class DefaultWidgetAuthorizationService extends java.lang.Object implements WidgetAuthorizationService
Default implementation forWidgetAuthorizationService. Checks visibility permissions for current user based on his activeAuthorityGroup.
-
-
Constructor Summary
Constructors Constructor Description DefaultWidgetAuthorizationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckAuthorityMatch(java.util.List<java.lang.String> list, java.util.List<java.lang.String> list2)Does a null-safeCollectionUtils.containsAny(java.util.Collection, java.util.Collection).protected AuthorityGroupServicegetAuthorityGroupService()protected CockpitUserServicegetCockpitUserService()booleanisAccessAllowed(Widget widget)Checks if a widget should be displayed or not, usually based on the widgets access restrictions.protected booleanisAccessAllowedForCurrentUser(Widget widget)Gets the current session user and checks if he has permisssions to see the widget.voidsetAuthorityGroupService(AuthorityGroupService authorityGroupService)voidsetCockpitUserService(CockpitUserService cockpitUserService)
-
-
-
Method Detail
-
isAccessAllowed
public boolean isAccessAllowed(Widget widget)
Description copied from interface:WidgetAuthorizationServiceChecks if a widget should be displayed or not, usually based on the widgets access restrictions.- Specified by:
isAccessAllowedin interfaceWidgetAuthorizationService- Parameters:
widget- object to check- Returns:
- whether a widget should be displayed or not, usually based on the widgets access restrictions
-
isAccessAllowedForCurrentUser
protected boolean isAccessAllowedForCurrentUser(Widget widget)
Gets the current session user and checks if he has permisssions to see the widget.
-
checkAuthorityMatch
protected boolean checkAuthorityMatch(java.util.List<java.lang.String> list, java.util.List<java.lang.String> list2)Does a null-safeCollectionUtils.containsAny(java.util.Collection, java.util.Collection).
-
getAuthorityGroupService
protected AuthorityGroupService getAuthorityGroupService()
-
setAuthorityGroupService
public void setAuthorityGroupService(AuthorityGroupService authorityGroupService)
-
getCockpitUserService
protected CockpitUserService getCockpitUserService()
-
setCockpitUserService
public void setCockpitUserService(CockpitUserService cockpitUserService)
-
-