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 (#530)

This change will update UserACL usage to not implicitly use the current
conversation state of authenticated user.
  • Loading branch information
boubaker committed Oct 6, 2024
1 parent 4cb6c34 commit 2314833
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
%>
<%@ page import="org.exoplatform.services.security.ConversationState"%>
<%@ page import="org.exoplatform.social.webui.Utils"%>
<%@ page import="org.exoplatform.portal.config.model.Page"%>
<%@ page import="org.exoplatform.portal.application.PortalRequestContext"%>
Expand All @@ -28,7 +29,7 @@
String portletStorageId = ((String) request.getAttribute("portletStorageId"));
String kudosPeriod = request.getAttribute("kudosPeriod") == null ? "week" : ((String[]) request.getAttribute("kudosPeriod"))[0];
Page currentPage = PortalRequestContext.getCurrentInstance().getPage();
boolean canEdit = ExoContainerContext.getService(UserACL.class).hasEditPermission(currentPage);
boolean canEdit = ExoContainerContext.getService(UserACL.class).hasEditPermission(currentPage, ConversationState.getCurrent().getIdentity());
String pageRef = currentPage.getPageKey().format();
%>
<div class="VuetifyApp">
Expand Down

0 comments on commit 2314833

Please sign in to comment.