Skip to content

Commit

Permalink
feat: Update calls to UserACL to avoid implicit usage of Conversation…
Browse files Browse the repository at this point in the history
… State in Service Layer - MEED-7555 - Meeds-io/MIPs#151 (#228)

This change will update UserACL usage to not implicitly use the current
conversation state of authenticated user.
  • Loading branch information
boubaker authored and exo-swf committed Oct 7, 2024
1 parent b4453d1 commit 2e507af
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<%@page import="org.exoplatform.services.security.ConversationState"%>
<%
/**
* This file is part of the Meeds project (https://meeds.io/).
Expand Down Expand Up @@ -42,7 +43,7 @@
String spacesMostActivePeriod = request.getAttribute("spacesMostActivePeriod") == null ? "30" : ((String[]) request.getAttribute("spacesMostActivePeriod"))[0];
Page currentPage = PortalRequestContext.getCurrentInstance().getPage();
boolean canEdit = ExoContainerContext.getService(UserACL.class)
.hasEditPermission(currentPage);
.hasEditPermission(currentPage, ConversationState.getCurrent().getIdentity());
String pageRef = currentPage.getPageKey().format();
boolean canCreateSpace = ExoContainerContext.getService(SpacesAdministrationService.class)
.canCreateSpace(request.getRemoteUser());
Expand Down

0 comments on commit 2e507af

Please sign in to comment.