From 1206124b6f7b7d569ceaf75a45f8dffac6ab062f Mon Sep 17 00:00:00 2001 From: ChrisKian Date: Mon, 16 Oct 2023 09:48:47 -0700 Subject: [PATCH] LPS-197701 Use the value from the "type_" column directly and append a "t" for "type". To keep header close to actual column data, include flag for the "site" column. --- .../portal/events/ServicePreAction.java | 22 ++++--------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/portal-impl/src/com/liferay/portal/events/ServicePreAction.java b/portal-impl/src/com/liferay/portal/events/ServicePreAction.java index e89db36610286d..81cfb7261c9628 100644 --- a/portal-impl/src/com/liferay/portal/events/ServicePreAction.java +++ b/portal-impl/src/com/liferay/portal/events/ServicePreAction.java @@ -1997,6 +1997,9 @@ private void _trackThemeDisplay( Group group = themeDisplay.getScopeGroup(); + httpServletResponse.addHeader( + "X-Liferay-Request-Group", group.getType() + "t"); + Layout layout = themeDisplay.getLayout(); if (group.getGroupId() == themeDisplay.getCompanyGroupId()) { @@ -2041,24 +2044,7 @@ private void _trackThemeDisplay( } if (group.isSite()) { - if (group.getType() == GroupConstants.TYPE_SITE_OPEN) { - httpServletResponse.addHeader("X-Liferay-Request-Group", "1"); - } - - if (group.getType() == GroupConstants.TYPE_SITE_RESTRICTED) { - httpServletResponse.addHeader("X-Liferay-Request-Group", "2"); - } - - if (group.getType() == GroupConstants.TYPE_SITE_PRIVATE) { - httpServletResponse.addHeader("X-Liferay-Request-Group", "3"); - } - - if (group.getType() == GroupConstants.TYPE_DEPOT) { - httpServletResponse.addHeader("X-Liferay-Request-Group", "5"); - } - } - else { - httpServletResponse.addHeader("X-Liferay-Request-Group", "4"); + httpServletResponse.addHeader("X-Liferay-Request-Group", "s"); } User user = themeDisplay.getUser();