Details
-
Improvement
-
Resolution: Fixed
-
Major
-
4.1.2
-
None
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
- if the current user is the same as the user in the page, visibility:
- 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