Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-7974

Add visibility and visibilityOptions parameters to the messageSender macro

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.2-milestone-1
    • Component/s: Message Stream
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Similar issues:

      Description

      Currently, the messageSender macro decides for itself, based on the page it is used on, what is the default selected visibility option.

      The choice is rather simple:

      • if it's a group page, visibility: group, value: current group
      • if it's a user page
        • if the current user is the same as the user in the page, visibility:
          followers
        • if the current user is not the same, visibility: user, value: current user
      • otherwise, visibility: everyone

      Also, the list of available visibility options is taken from the XWiki.MessageStreamConfig class, as the possible values of the 'visibilityLevel' property.

      This issue proposes to allow a macro caller to override this mechanism and specify what is the currently selected (default) visibility level and what are the available options to choose from.

      The idea is to add 3 parameters:

      • visibility: default selected visibility
      • visibilityParameter: in case of a visibility level that accepts a parameter (user/group)
      • visibilityOptions: comma separated sublist of the default ones

        Attachments

          Activity

            People

            • Assignee:
              enygma Eduard Moraru
              Reporter:
              enygma Eduard Moraru
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: