Uploaded image for project: 'PUBLIC - Liferay Social Office Community Edition'
  1. PUBLIC - Liferay Social Office Community Edition
  2. SOS-2537

Adding calendar event send mail to ALL social office user (site independent )

    Details

    • Affects Portal Version/s:
      6.2.x

      Description

      I have added permission:

      Calendar > Calendar: Manage Events | All Sites

      because I want that a member of a social office site can manage his calendar and the site calendar.

      When a member (of a social office site) add a calendar event without invite member, no mails are sent.

      When he invites (during event definition) another member(s) of that site the system send mail to ALL user who belong to Social Office User Role.

      This is the snippet of com.liferay.calendar.util.NotificationUtil.java (calendar-portlet plugin):

      private static List<NotificationRecipient> _getNotificationRecipients(...

      List<Role> roles = RoleLocalServiceUtil.getResourceBlockRoles(
      calendar.getResourceBlockId(), Calendar.class.getName(),
      ActionKeys.MANAGE_BOOKINGS);
      ...
      for (Role role : roles) {
      String name = role.getName();

      if (name.equals(RoleConstants.OWNER)) {
      ...
      else {
      //SOCIAL OFFICE USER
      List<User> roleUsers =
      UserLocalServiceUtil.getRoleUsers(role.getRoleId());

      for (User roleUser : roleUsers) {
      PermissionChecker permissionChecker =
      PermissionCheckerFactoryUtil.create(roleUser);

      if (!CalendarPermission.contains(
      permissionChecker, calendar,
      ActionKeys.MANAGE_BOOKINGS))

      { continue; }

      notificationRecipients.add(
      new NotificationRecipient(roleUser));
      }
      }

      It seems that the system doesn't check if a member belongs to that site, it reads all social office user mail addresses and send a notification to them.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                4 years, 30 weeks, 5 days ago

                Packages

                Version Package