From e19430e0fdd2443ba65944a438595f914f708de2 Mon Sep 17 00:00:00 2001 From: Boubaker Khanfir Date: Mon, 13 Jan 2025 17:28:11 +0100 Subject: [PATCH] feat: Allow to use Site Publication Button on any Site - MEED-8080 - Meeds-io/MIPs#173 (#4335) Prior to this change, the Site Publication button was possible to use on 'public' site only. This change will allow to use it on any site based on 'public' site template. --- .../main/webapp/WEB-INF/jsp/portlet/topBarPublishSite.jsp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webapp/src/main/webapp/WEB-INF/jsp/portlet/topBarPublishSite.jsp b/webapp/src/main/webapp/WEB-INF/jsp/portlet/topBarPublishSite.jsp index b3066cb8add..1c9945eb169 100644 --- a/webapp/src/main/webapp/WEB-INF/jsp/portlet/topBarPublishSite.jsp +++ b/webapp/src/main/webapp/WEB-INF/jsp/portlet/topBarPublishSite.jsp @@ -1,3 +1,4 @@ +<%@page import="org.exoplatform.portal.application.PortalRequestContext"%> <%@page import="java.util.Arrays"%> <%@page import="org.exoplatform.portal.config.model.PortalConfig"%> <%@page import="org.exoplatform.container.ExoContainerContext"%> @@ -24,9 +25,9 @@ %> <% LayoutService layoutService = ExoContainerContext.getService(LayoutService.class); - PortalConfig portalConfig = layoutService.getPortalConfig("public"); + PortalConfig portalConfig = PortalRequestContext.getCurrentInstance().getPortalConfig(); boolean publisSiteAccessible = portalConfig != null && Arrays.asList(portalConfig.getAccessPermissions()).contains("Everyone"); - long siteId = portalConfig == null ? 0 : Long.parseLong(portalConfig.getStorageId().replace("site_", "")); + long siteId = portalConfig == null ? 0 : portalConfig.getId(); %>