Allow setting member_roster_visibility for a MailingList.

parent 43e0b9e1
......@@ -44,6 +44,8 @@ along with Postorius. If not, see <http://www.gnu.org/licenses/>.
* Add a badge with count of held messages and pending subscription requests
for moderator approval. (Closes #308)
* Add support to add, view and remove domain owners.
* Allow setting the visibility options for MailingList's member list.
1.2.4
=====
......
......@@ -46,6 +46,12 @@ DIGEST_FREQUENCY_CHOICES = (
("yearly", _("Yearly"))
)
ROSTER_VISIBILITY_CHOICES = (
("moderators", _("Only mailinglist moderators")),
("members", _("Only mailinglist members")),
("public", _("Anyone")),
)
EMPTY_STRING = ''
......@@ -685,6 +691,13 @@ class ListIdentityForm(ListSettingsForm):
widget=forms.Select(),
choices=LANGUAGES,
)
member_roster_visibility = forms.ChoiceField(
label=_('Members List Visibility'),
required=False,
widget=forms.Select(),
choices=ROSTER_VISIBILITY_CHOICES,
help_text=_('Who is allowed to see members list for this MailingList?')
)
def clean_subject_prefix(self):
"""
......
......@@ -155,6 +155,8 @@ class ListSettingsTest(ViewTestCase):
'subject_prefix': '',
'description': '',
'advertised': 'True',
'preferred_language': 'en',
'member_roster_visibility': 'public',
})
self.assertRedirects(response, url)
self.assertHasSuccessMessage(response)
......
......@@ -235,6 +235,8 @@ class TestListIdentityForm(TestCase):
'info': 'This is a larger description of this mailing list.',
'display_name': 'Most Desirable Mailing List',
'subject_prefix': ' [Most Desirable] ',
'preferred_language': 'en',
'member_roster_visibility': 'public',
}, mlist=None)
self.assertFalse(form.is_valid())
self.assertTrue('advertised' in form.errors)
......
......@@ -7,9 +7,9 @@ changedir = {toxinidir}/example_project
deps =
mock
beautifulsoup4
mailman
mailman
pytest
pytest-django
pytest-django
head: git+https://gitlab.com/mailman/mailmanclient.git
head: git+https://gitlab.com/mailman/django-mailman3.git
dev: -e../mailmanclient
......@@ -18,10 +18,10 @@ deps =
django111: Django>=1.11,<1.12
django20: Django>=2.0,<2.1
django21: Django>=2.1,<2.2
django22: Django>=2.2,<2.3
django22: Django>=2.2,<2.3
django-latest: https://github.com/django/django/archive/master.tar.gz
commands =
pytest {posargs:../src}
pytest {posargs:../src}
setenv =
LC_ALL = C.UTF-8
LANG = C.UTF-8
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment