List of usage examples for com.liferay.portal.kernel.theme ThemeDisplay isImpersonated
public boolean isImpersonated()
true
if the user is being impersonated by an administrative user. From source file:com.liferay.grow.linkedpages.LinkedPagesPortletControlMenuEntry.java
License:Open Source License
@Override public boolean isShow(HttpServletRequest request) throws PortalException { ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY); Layout layout = themeDisplay.getLayout(); if (layout.isTypeControlPanel()) { return false; }/* ww w . j av a 2 s .co m*/ if (themeDisplay.isImpersonated()) { return true; } User user = themeDisplay.getUser(); if (themeDisplay.isSignedIn() && user.isSetupComplete()) { return true; } return false; }
From source file:com.liferay.product.navigation.control.menu.theme.contributor.internal.ProductNavigationControlMenuTemplateContextContributor.java
License:Open Source License
protected boolean isShowControlMenu(HttpServletRequest request) { ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY); if (themeDisplay.isImpersonated()) { return true; }/* w w w . j a va2 s. co m*/ if (!themeDisplay.isSignedIn()) { return false; } User user = themeDisplay.getUser(); if (!user.isSetupComplete()) { return false; } return true; }
From source file:com.liferay.product.navigation.product.menu.theme.contributor.internal.ProductMenuTemplateContextContributor.java
License:Open Source License
protected boolean isShowProductMenu(HttpServletRequest request) { ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY); if (themeDisplay.isImpersonated()) { return true; }/*from w ww . j a v a 2 s. c om*/ if (!themeDisplay.isSignedIn()) { return false; } User user = themeDisplay.getUser(); if (!user.isSetupComplete()) { return false; } return true; }
From source file:com.liferay.product.navigation.product.menu.web.internal.product.navigation.control.menu.ProductMenuProductNavigationControlMenuEntry.java
License:Open Source License
@Override public boolean isShow(HttpServletRequest request) throws PortalException { ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY); if (themeDisplay.isImpersonated()) { return true; }/*from w w w . j av a 2 s . c o m*/ User user = themeDisplay.getUser(); if (themeDisplay.isSignedIn() && user.isSetupComplete()) { return true; } return false; }