Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-25928

Group-scoped announcements are set as drafts when changing their owner's group membership

    XMLWordPrintable

    Details

      Description

      Steps to reproduce:

      1. Create a group-scoped announcement for the group X.
      2. Exclude the announcement's author from the group X.
      3. When the author refresh the announcement list, this announcement will turn into a draft and will not be visible for other users.

      I don't know if this is an expected behaviour, but I think that changing users' groups should not modify the announcements status. Reading the comments in the source code, perhaps the intention was to turn the message into a draft when the message's group is deleted (not when the author changes his group membership).

      This is the affected code in BaseMessage.java from message/message-util:

      if (!isIntersectionGroupRefsToGroups(msgGroups, allowedGroups)){
      ...
      ...
      //convert it into draft, if the associated group is deleted
      //do not convert it into draft when you are switching from and to view as mode
      if (userId.equals(header.getFrom().getId()) && !isViewingAs){
      header.setDraft(true);
      try

      { header.clearGroupAccess(); }

      catch (PermissionException e)

      { // TODO Auto-generated catch block e.printStackTrace(); }

      this.commitDraftChanges(msg1);
      msg=(Message) msg1;

      }
      ...
      ...
      }

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  maintenanceteam Core Team
                  Reporter:
                  joserabal José Rabal Sastre
                  Votes:
                  1 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration