Skip to content

Commit

Permalink
LPS-197701 Use the value from the "type_" column directly and append …
Browse files Browse the repository at this point in the history
…a "t" for "type". To keep header close to actual column data, include flag for the "site" column.
  • Loading branch information
ChrisKian authored and brianchandotcom committed Oct 24, 2023
1 parent d5c5a2d commit 1206124
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions portal-impl/src/com/liferay/portal/events/ServicePreAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 1206124

Please sign in to comment.