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

Add visibility and visibilityOptions parameters to the messageSender macro

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 4.2-milestone-1
    • 4.1.2
    • Message Stream
    • None
    • Unknown
    • N/A

    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

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

            Dates

              Created:
              Updated:
              Resolved: