Portal Showcase
Note: Liferay Portal has three types of resources, each having associated permissions:
|
portal:permissionsURL
PermissionsURL is a UIOutput component that generates a URL pointing to the Liferay Portal Permissions UI. If the var attribute is present, the component introduces a variable into the EL. Otherwise, the URL is written to the response.Top-Level Usage
Access the Top-Level Model Resource Permissions by specifying the Fully-Qualified Class Name (FQCN) of the ServiceBuilder model via the modelResource attribute and thegroupId
(the ID of the Liferay Portal Site) via the resourcePrimKey attribute.
https://www.liferayfaces.org:443/hu/portal-showcase?p_p_id=com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet&p_p_lifecycle=0&p_p_state=maximized&_com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet_mvcPath=%2Fedit_permissions.jsp&_com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet_redirect=%2Fhu%2Fweb%2Fguest%2Fportal-showcase%2F-%2Fportal-tag%2Fportal%2Fpermissionsurl%2Ftoplevel&_com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet_returnToFullPageURL=%2Fhu%2Fweb%2Fguest%2Fportal-showcase%2F-%2Fportal-tag%2Fportal%2Fpermissionsurl%2Ftoplevel&_com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet_portletConfiguration=true&_com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet_portletResource=1_WAR_comliferayfacesdemoportalshowcaseportlet&_com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet_modelResource=com.liferay.portal.kernel.model.Group&_com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet_modelResourceDescription=%3C%3Fxml+version%3D%271.0%27+encoding%3D%27UTF-8%27%3F%3E%3Croot+available-locales%3D%22en_US%22+default-locale%3D%22en_US%22%3E%3CName+language-id%3D%22en_US%22%3EGuest%3C%2FName%3E%3C%2Froot%3E+Fels%C5%91+szint&_com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet_resourceGroupId=20121&_com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet_resourcePrimKey=20121
Forráskód
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:portal="http://liferay.com/faces/portal" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> <portal:permissionsURL modelResource="com.liferay.portal.kernel.model.Group" modelResourceDescription="#{liferay.themeDisplay.scopeGroup.name} #{i18n['top-level']}" resourcePrimKey="#{liferay.themeDisplay.scopeGroupId}" var="permissionsURL" /> <pre>#{permissionsURL}</pre> <h:panelGroup rendered="#{liferay.userHasPortletPermission['PERMISSIONS']}"> <a href="#{permissionsURL}">#{i18n['permissions']}</a> </h:panelGroup> </ui:composition>
Liferay Faces Bridge Implementation 5.0.0 + Liferay Faces Portal 5.0.0 + Showcase Common 3.1.1 + Liferay Faces Util 3.4.1 + Mojarra 2.2.20