Skip to content

Commit

Permalink
feat: Allow to use Site Publication Button on any Site - MEED-8080 - M…
Browse files Browse the repository at this point in the history
…eeds-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.
  • Loading branch information
boubaker authored and exo-swf committed Jan 17, 2025
1 parent fd39adc commit e19430e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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"%>
Expand All @@ -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();
%>
<div class="VuetifyApp">
<div
Expand Down

0 comments on commit e19430e

Please sign in to comment.