Skip to content

Commit

Permalink
Updated Mailman 3 Web build and configuration
Browse files Browse the repository at this point in the history
Updated Mailman 3 Web Dockerfile to pin version numbers for various
django- modules. Updated settings.py configuration to remove all
social login providers. Updated login template file to remove links
to social providers.
  • Loading branch information
skoranda committed Oct 28, 2018
1 parent a935a21 commit 40f4a25
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 28 deletions.
17 changes: 16 additions & 1 deletion comanage-registry-mailman/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,19 @@ RUN apt-get update \
netcat-traditional \
postgresql-client \
sassc \
&& pip install -U django==1.11 pip \
&& pip install --upgrade pip \
&& pip install django-allauth==0.35.0 \
django-appconf==1.0.2 \
django-compressor==2.2 \
django-extensions==2.0.7 \
django-gravatar2==1.4.2 \
django-haystack==2.8.1 \
django-mailman3==1.1.0 \
django-paintstore==0.2 \
django-picklefield==1.0.0 \
django-q==0.9.4 \
djangorestframework==3.8.2 \
&& pip install django==1.11 \
&& pip install mailmanclient==3.1.1 \
postorius==1.1.2 \
hyperkitty==1.1.4 \
Expand All @@ -44,6 +56,9 @@ RUN apt-get update \
# Add needed files for uwsgi server + settings for django
COPY mailman-web /opt/mailman-web

# Overlay customized template for Postorius login
COPY login.html /usr/local/lib/python2.7/site-packages/django_mailman3/templates/account/

RUN chown -R mailman:mailman /opt/mailman-web/ \
&& chmod u+x /opt/mailman-web/manage.py

Expand Down
29 changes: 29 additions & 0 deletions comanage-registry-mailman/web/login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{% extends "account/base.html" %}

{% load i18n %}
{% load account socialaccount %}
{% load bootstrap_tags %}

{% block head_title %}{% trans "Sign In" %}{% endblock %}

{% block content %}

<h1>{% trans "Sign In" %}</h1>

{% include "django_mailman3/login_extra_top.html" %}

<form class="login form-horizontal" method="POST" action="{% url 'account_login' %}">
{% bootstrap_form_horizontal form 2 4 %}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}
<div class="form-group">
<div class="col-md-offset-2 col-md-4">
<button class="btn btn-primary" type="submit">{% trans "Sign In" %}</button>
&nbsp;
<a href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
</div>
</div>
</form>

{% endblock %}
28 changes: 1 addition & 27 deletions comanage-registry-mailman/web/mailman-web/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,33 +257,7 @@
ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
ACCOUNT_UNIQUE_EMAIL = True

SOCIALACCOUNT_PROVIDERS = {
'openid': {
'SERVERS': [
dict(id='yahoo',
name='Yahoo',
openid_url='http://me.yahoo.com'),
],
},
'google': {
'SCOPE': ['profile', 'email'],
'AUTH_PARAMS': {'access_type': 'online'},
},
'facebook': {
'METHOD': 'oauth2',
'SCOPE': ['email'],
'FIELDS': [
'email',
'name',
'first_name',
'last_name',
'locale',
'timezone',
],
'VERSION': 'v2.4',
},
}

SOCIALACCOUNT_PROVIDERS = {}

# django-compressor
# https://pypi.python.org/pypi/django_compressor
Expand Down

0 comments on commit 40f4a25

Please sign in to comment.