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

This change will update `UserACL` usage to not implicitly use the
current conversation state of authenticated user in `UserACL`
(ServiceLayer).
  • Loading branch information
boubaker committed Oct 7, 2024
1 parent b5124aa commit f3c8f39
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.exoplatform.services.rest.resource.ResourceContainer;
import org.exoplatform.services.security.ConversationState;

/**
* @author <a href="mailto:[email protected]">Anouar
Expand Down Expand Up @@ -72,7 +73,7 @@ public Response getPlatformInformation() {
String plfProfile = ExoContainer.getProfiles().toString().trim();
String runningProfile = plfProfile.substring(1, plfProfile.length() - 1);
JsonPlatformInfo jsonPlatformInfo = new JsonPlatformInfo();
if (userACL.isUserInGroup(userACL.getAdminGroups())) {
if (userACL.isAdministrator(ConversationState.getCurrent().getIdentity())) {
jsonPlatformInfo.setPlatformVersion(platformInformations.getVersion());
jsonPlatformInfo.setPlatformBuildNumber(platformInformations.getBuildNumber());
jsonPlatformInfo.setPlatformRevision(platformInformations.getRevision());
Expand Down

0 comments on commit f3c8f39

Please sign in to comment.