Remove browserID as alternative login option

The service as provided by mozilla is being discontinued and will cease to work
on the 30th of November 2016. Users using this will need to use the regular
login form. Since persona was based on emails, this is a viable option. Fixes #331
This commit is contained in:
Roland Geider
2016-09-21 00:03:05 +02:00
parent e07e797de0
commit b4af0d8710
10 changed files with 9 additions and 40 deletions

View File

@@ -31,6 +31,7 @@ New features:
* Add extended PDF options to schedules as well (thanks `@alelevinas`_ ) `#272`_
* Show trained secondary muscles in workout view (thanks `@alokhan`_ ) `#282`_
* Use the metricsgraphics library to more easily draw charts `#188`_
* Removed persona (browserID) as a login option, the service is being discontinued `#331`_
Improvements:
@@ -79,6 +80,7 @@ Other improvements and bugfixes: `#25`_, `#243`_, `#279`_, `#275`_, `#270`_,
.. _#324: https://github.com/wger-project/wger/issues/324
.. _#325: https://github.com/wger-project/wger/issues/325
.. _#330: https://github.com/wger-project/wger/issues/330
.. _#331: https://github.com/wger-project/wger/issues/331
.. _@petervanderdoes: https://github.com/petervanderdoes
.. _@DeveloperMal: https://github.com/DeveloperMal
.. _@alelevinas: https://github.com/alelevinas

View File

@@ -3,7 +3,6 @@
#
Django>=1.9,<1.10
django-browserid>=1.0,<1.1
django-recaptcha
reportlab
django_mobile
@@ -16,7 +15,7 @@ django_compressor
icalendar
django-bootstrap-breadcrumbs
sphinx
django-sortedm2m
django-sortedm2m
django-bower
invoke

View File

@@ -203,7 +203,7 @@
{% if not trainer_identity %}
<li class="divider"></li>
<li>
<a href="{% url 'core:user:logout' %}" class="browserid-logout">
<a href="{% url 'core:user:logout' %}">
<span class="{% fa_class 'sign-out' %}"></span>
{% trans "Logout" %}
</a>

View File

@@ -1,11 +1,10 @@
{% extends "base.html" %}
{% load browserid i18n staticfiles wger_extras %}
{% load i18n staticfiles wger_extras %}
{% block title %}{% trans "Delete account" %}{% endblock %}
{% block header %}
{% browserid_css %}
{% endblock %}
{% block content %}

View File

@@ -1,15 +1,10 @@
{% extends "base.html" %}
{% load browserid i18n staticfiles wger_extras %}
{% load i18n staticfiles wger_extras %}
{% block title %}{% trans "Login" %}{% endblock %}
{% block header %}
<script src="https://login.persona.org/include.js"></script>
<script src="{% static 'browserid/api.js' %}"></script>
<script src="{% static 'browserid/browserid.js' %}"></script>
{% browserid_info %}
{% endblock %}
{% block content %}
@@ -38,22 +33,4 @@
{% trans "Reset password" %}
</a>
</p>
{% if not hide_persona %}
<h4>Persona</h4>
<a id="browserid-login"
href="#"
class="browserid-login browserid-login"
data-site-name="Workout Manager"
data-next="/">
<span>{% trans "Sign in with your Email" %}</span>
</a>
<p>
<small>{% blocktrans %}Persona (BrowserID) replaces multiple passwords, you don't
need to remember a new password for this site. For more information, please
take a look at the <a href="https://login.persona.org/" target="_blank">the
Persona website</a>.{% endblocktrans %}</small>
</p>
{% endif %}
{% endblock %}

View File

@@ -123,7 +123,7 @@ $(function() {
</button>
<ul class="dropdown-menu">
<li>
<a href="{% url 'core:user:logout' %}" class="browserid-logout">
<a href="{% url 'core:user:logout' %}">
<span class="{% fa_class 'sign-out' %}"></span>
{% trans "Logout" %}
</a>
@@ -149,4 +149,4 @@ $(function() {
</li>
</ul>
</div>
{% endblock %}
{% endblock %}

View File

@@ -72,8 +72,7 @@ def login(request):
Small wrapper around the django login view
'''
context = {'hide_persona': check_request_amazon(request) or check_request_android(request),
'active_tab': USER_TAB}
context = {'active_tab': USER_TAB}
if request.GET.get('next'):
context['next'] = request.GET.get('next')

View File

@@ -36,7 +36,6 @@ NOCAPTCHA = True
# This is needed for uploaded files and images (exercise images, etc.) to be
# properly served.
SITE_URL = '{siteurl}'
BROWSERID_AUDIENCES = [SITE_URL]
# Path to uploaded files
# Absolute filesystem path to the directory that will hold user-uploaded files.

View File

@@ -37,7 +37,6 @@ WSGI_APPLICATION = 'wger.wsgi.application'
INSTALLED_APPS = (
'django.contrib.auth',
'django_browserid', # Load after auth to monkey-patch it.
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
@@ -131,7 +130,6 @@ MIDDLEWARE_CLASSES = (
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'django_browserid.auth.BrowserIDBackend',
'wger.utils.helpers.EmailAuthBackend'
)

View File

@@ -144,7 +144,6 @@ urlpatterns = i18n_patterns(
url(r'config/', include('wger.config.urls', namespace='config', app_name='config')),
url(r'gym/', include('wger.gym.urls', namespace='gym', app_name='gym')),
url(r'email/', include('wger.email.urls', namespace='email')),
url(r'^browserid/', include('django_browserid.urls')),
url(r'^sitemap\.xml$',
sitemap,
{'sitemaps': sitemaps},
@@ -161,9 +160,6 @@ urlpatterns += [
url(r'^manifest\.webapp$', WebappManifestView.as_view(template_name="manifest.webapp")),
url(r'^amazon-manifest\.webapp$', WebappManifestView.as_view(template_name="amazon-manifest.webapp")),
# persona (browserID) login
url(r'^browserid/', include('django_browserid.urls')),
# API
url(r'^api/', include(v1_api.urls)),
url(r'^api/v2/exercise/search/$',