Skip to content

Commit

Permalink
LPS-197701 Check if a group is a site before assigning it a 1-5 value
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisKian authored and brianchandotcom committed Oct 24, 2023
1 parent 0634933 commit d5c5a2d
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions portal-impl/src/com/liferay/portal/events/ServicePreAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -2040,17 +2040,22 @@ private void _trackThemeDisplay(
httpServletResponse.addHeader("X-Liferay-Request-Group", "9x");
}

if (group.getType() == GroupConstants.TYPE_SITE_OPEN) {
httpServletResponse.addHeader("X-Liferay-Request-Group", "1");
}
else if (group.getType() == GroupConstants.TYPE_SITE_RESTRICTED) {
httpServletResponse.addHeader("X-Liferay-Request-Group", "2");
}
else if (group.getType() == GroupConstants.TYPE_SITE_PRIVATE) {
httpServletResponse.addHeader("X-Liferay-Request-Group", "3");
}
else if (group.getType() == GroupConstants.TYPE_DEPOT) {
httpServletResponse.addHeader("X-Liferay-Request-Group", "5");
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");
Expand Down

0 comments on commit d5c5a2d

Please sign in to comment.