diff --git a/README.rst b/README.rst
index 0af843c..d978a8a 100644
--- a/README.rst
+++ b/README.rst
@@ -26,7 +26,7 @@
Postorius requires Python 2.6 or newer and mailman.client,
the official Python bindings for GNU Mailman, it also requires
django-social-auth.
-The minimum Django version is 1.3.
+The minimum Django version is 1.6.
Postorius needs a running version of GNU Mailman version 3.
diff --git a/setup.py b/setup.py
index 8dcca73..0c01869 100644
--- a/setup.py
+++ b/setup.py
@@ -26,7 +26,7 @@
setup(
name="postorius",
- version='1.0.0b1',
+ version='1.0.0b3',
description="A web user interface for GNU Mailman",
long_description=open('README.rst').read(),
maintainer="The Mailman GSOC Coders",
@@ -39,7 +39,7 @@
packages=find_packages('src'),
package_dir={'': 'src'},
include_package_data=True,
- install_requires=['django>=1.5, <1.8',
+ install_requires=['django>=1.6',
'django-browserid',
'mailmanclient']
)
diff --git a/src/postorius/__init__.py b/src/postorius/__init__.py
index d841089..871cc3f 100644
--- a/src/postorius/__init__.py
+++ b/src/postorius/__init__.py
@@ -16,4 +16,4 @@
# You should have received a copy of the GNU General Public License along with
# Postorius. If not, see .
-__version__ = '1.0.0b1'
+__version__ = '1.0.0b3'
diff --git a/src/postorius/auth/decorators.py b/src/postorius/auth/decorators.py
index fed0033..80f39dc 100644
--- a/src/postorius/auth/decorators.py
+++ b/src/postorius/auth/decorators.py
@@ -88,7 +88,12 @@
user.email not in mlist.owners:
raise PermissionDenied
else:
- user.is_list_moderator = True
+ if user.email in mlist.moderators and \
+ user.email not in mlist.owners:
+ user.is_list_moderator = True
+ else:
+ user.is_list_moderator = True
+ user.is_list_owner = True
return fn(*args, **kwargs)
return wrapper
diff --git a/src/postorius/context_processors.py b/src/postorius/context_processors.py
index 5895b84..6a9a4b4 100644
--- a/src/postorius/context_processors.py
+++ b/src/postorius/context_processors.py
@@ -15,8 +15,12 @@
#
# You should have received a copy of the GNU General Public License along with
# Postorius. If not, see .
+
import logging
+from django.conf import settings
+from django.core.urlresolvers import reverse, NoReverseMatch
+
logger = logging.getLogger(__name__)
@@ -31,7 +35,16 @@
else:
template_to_extend = "postorius/base.html"
+ # Find the HyperKitty URL if installed
+ hyperkitty_url = False
+ if "hyperkitty" in settings.INSTALLED_APPS:
+ try:
+ hyperkitty_url = reverse("hk_root")
+ except NoReverseMatch:
+ pass
+
return {
'postorius_base_template': template_to_extend,
'request': request,
+ 'hyperkitty_url': hyperkitty_url,
}
diff --git a/src/postorius/doc/news.rst b/src/postorius/doc/news.rst
index ce4c260..5f61066 100644
--- a/src/postorius/doc/news.rst
+++ b/src/postorius/doc/news.rst
@@ -22,7 +22,7 @@
1.0 beta 2
==========
-(2015-xx-xx)
+(2015-04-15)
* French translation. Provided by Guillaume Libersat
* Addedd an improved test harness using WebTest. Contributed by Aurélien Bompard.
@@ -37,6 +37,8 @@
* Rework of internal testing
* Mozilla Persona integration: switch from django-social-auto to django-browserid: Contributed by Abhilash Raj.
* Fix manage.py mmclient command for non-IPython shells. Contributed by Ankush Sharma (LP: 1428169).
+* Added archiver options: Site-wide enabled archivers can not be enabled
+on a per-list basis through the web UI.
1.0 beta 1 -- "Year of the Parrot"
diff --git a/src/postorius/forms.py b/src/postorius/forms.py
index e1d0596..cb33fb2 100644
--- a/src/postorius/forms.py
+++ b/src/postorius/forms.py
@@ -20,7 +20,6 @@
from django.core.validators import validate_email, URLValidator
from django.utils.translation import gettext_lazy as _
from fieldset_forms import FieldsetForm
-from django.forms.models import modelformset_factory
class DomainNew(FieldsetForm):
@@ -41,16 +40,13 @@
description = forms.CharField(
label=_('Description'),
required=False)
- contact_address = forms.EmailField(
- label=_('Contact Address'),
- required=False)
def clean_mail_host(self):
mail_host = self.cleaned_data['mail_host']
try:
validate_email('mail@' + mail_host)
except:
- raise forms.ValidationError(_("Enter a valid Mail Host"))
+ raise forms.ValidationError(_("Please enter a valid domain name"))
return mail_host
def clean_web_host(self):
@@ -58,7 +54,7 @@
try:
URLValidator()(web_host)
except:
- raise forms.ValidationError(_("Please enter a valid Web Host"))
+ raise forms.ValidationError(_("Please enter a valid domain name"))
return web_host
class Meta:
@@ -432,10 +428,19 @@
# label=_('No reply address'),
# required=False,
# )
- posting_pipeline = forms.CharField(
+ posting_pipeline = forms.ChoiceField(
label=_('Pipeline'),
+ widget=forms.Select(),
+ required=False,
+ error_messages={
+ 'required': _("Please choose a reply-to action.")},
+ choices=(
+ ("default-owner-pipeline", _("default-owner-pipeline")),
+ ("default-posting-pipeline", _("default-posting-pipeline")),
+ ("virgin", _("virgin"))),
help_text=(
'Type of pipeline you want to use for this mailing list')
+
)
# post_id = forms.IntegerField(
# label=_('Post ID'),
@@ -678,6 +683,20 @@
]
+class ListArchiverForm(forms.Form):
+ """
+ Select archivers for a list.
+ """
+ archivers = forms.MultipleChoiceField(
+ widget=forms.CheckboxSelectMultiple,
+ label=_('Activate archivers for this list'))
+
+ def __init__(self, archivers, *args, **kwargs):
+ super(ListArchiverForm, self).__init__(*args, **kwargs)
+ self.fields['archivers'].choices = sorted(
+ [(key, key) for key in archivers.keys()])
+
+
class Login(FieldsetForm):
"""Form fields to let the user log in.
@@ -723,6 +742,24 @@
layout = [["Mass subscription", "emails"]]
+class ListMassRemoval(FieldsetForm):
+
+ """Form fields to remove multiple list users.
+ """
+ emails = forms.CharField(
+ label=_('Emails to Unsubscribe'),
+ widget=forms.Textarea,
+ )
+
+ class Meta:
+
+ """
+ Class to define the name of the fieldsets and what should be
+ included in each.
+ """
+ layout = [["Mass Removal", "emails"]]
+
+
class UserPreferences(FieldsetForm):
"""
@@ -919,7 +956,8 @@
email = cleaned_data.get('email')
user_email = cleaned_data.get('user_email')
if email == user_email:
- raise forms.ValidationError(_('Please provide a different email address than your own.'))
+ raise forms.ValidationError(_('Please provide a different email '
+ 'address than your own.'))
return cleaned_data
class ChangeSubscriptionForm(forms.Form):
diff --git a/src/postorius/static/postorius/css/style.css b/src/postorius/static/postorius/css/style.css
index c3bbf3a..af1a86f 100755
--- a/src/postorius/static/postorius/css/style.css
+++ b/src/postorius/static/postorius/css/style.css
@@ -52,7 +52,7 @@
/***** meta nav *****/
.mm_header {
- padding: 5px;
+ padding: 5px 0;
border-bottom: 1px solid #CACACA;
background: #fafafa;
background: -moz-linear-gradient(top, #fff 0%, #efefef 100%);
@@ -290,3 +290,12 @@
/* Internet Explorer */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
+
+/* archival options */
+.well .archival-options-form ul {
+ margin-top: 15px;
+ margin-bottom: 15px;
+}
+.well .archival-options-form li {
+ display: block;
+}
diff --git a/src/postorius/static/postorius/js/script.js b/src/postorius/static/postorius/js/script.js
index 9651f3a..fbd37a8 100755
--- a/src/postorius/static/postorius/js/script.js
+++ b/src/postorius/static/postorius/js/script.js
@@ -1,5 +1,4 @@
$(document).ready(function(){
$('.collapse').collapse({
- toggle: false,
- });
+toggle: false,
});
diff --git a/src/postorius/templates/postorius/base.html b/src/postorius/templates/postorius/base.html
index 063e08b..3dc4283 100644
--- a/src/postorius/templates/postorius/base.html
+++ b/src/postorius/templates/postorius/base.html
@@ -3,14 +3,16 @@
-
Mailman/Postorius
+
+ {% block title %}
+ {% block subtitle %}{% endblock %}{{ subtitle|add:"-Mailman/Postorius" }}
+ {% endblock %}
+
-
-
@@ -22,13 +24,12 @@
{% if user.is_authenticated %}
@@ -45,7 +46,7 @@
{% if messages %}
{% for message in messages %}
- - {{ message }}
+ - {{ message }}
{% endfor %}
{% endif %}
@@ -64,7 +65,6 @@
-
-
+
{% block additionaljs %}{% endblock %}