Skip to content

Commit 9aba859

Browse files
carolmariaabbbrianchandotcom
authored andcommitted
LPD-51804 Add new system group for Calendar
1 parent d999a8e commit 9aba859

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

portal-impl/src/com/liferay/portal/service/impl/GroupLocalServiceImpl.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ else if ((type != GroupConstants.TYPE_DEPOT) &&
451451
if (className.equals(Group.class.getName())) {
452452
if (!site && (liveGroupId == 0) &&
453453
!(StringUtil.startsWith(groupKey, GroupConstants.APP) ||
454+
groupKey.equals(GroupConstants.CALENDAR) ||
454455
groupKey.equals(GroupConstants.CMS) ||
455456
groupKey.equals(GroupConstants.CONTROL_PANEL) ||
456457
groupKey.equals(GroupConstants.FORMS))) {
@@ -868,7 +869,12 @@ public void checkSystemGroups(long companyId) throws PortalException {
868869
boolean site = true;
869870
UnicodeProperties typeSettingsUnicodeProperties = null;
870871

871-
if (groupKey.equals(GroupConstants.CMS)) {
872+
if (groupKey.equals(GroupConstants.CALENDAR)) {
873+
type = GroupConstants.TYPE_SITE_PRIVATE;
874+
friendlyURL = GroupConstants.CALENDAR_FRIENDLY_URL;
875+
site = false;
876+
}
877+
else if (groupKey.equals(GroupConstants.CMS)) {
872878
type = GroupConstants.TYPE_SITE_PRIVATE;
873879
friendlyURL = GroupConstants.CMS_FRIENDLY_URL;
874880
site = false;

portal-kernel/src/com/liferay/portal/kernel/model/GroupConstants.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ public class GroupConstants {
1414

1515
public static final String APP = "App";
1616

17+
public static final String CALENDAR = "Calendar";
18+
19+
public static final String CALENDAR_FRIENDLY_URL = "/calendar";
20+
1721
public static final String CMS = "CMS";
1822

1923
public static final String CMS_FRIENDLY_URL = "/cms";
@@ -43,7 +47,8 @@ public class GroupConstants {
4347
public static final int MEMBERSHIP_RESTRICTION_TO_PARENT_SITE_MEMBERS = 1;
4448

4549
public static final String[] SYSTEM_GROUPS = {
46-
CMS, CONTROL_PANEL, FORMS, GUEST, GroupConstants.USER_PERSONAL_SITE
50+
CALENDAR, CMS, CONTROL_PANEL, FORMS, GUEST,
51+
GroupConstants.USER_PERSONAL_SITE
4752
};
4853

4954
public static final int TYPE_DEPOT = 5;

0 commit comments

Comments
 (0)