From b4af0d87103efd33d180edef9ffbe395fc679b03 Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Wed, 21 Sep 2016 00:03:05 +0200 Subject: [PATCH] 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 --- docs/changelog.rst | 2 ++ requirements.txt | 3 +-- wger/core/templates/navigation.html | 2 +- wger/core/templates/user/delete_account.html | 3 +-- wger/core/templates/user/login.html | 25 +------------------- wger/core/templates/user/preferences.html | 4 ++-- wger/core/views/user.py | 3 +-- wger/settings.tpl | 1 - wger/settings_global.py | 2 -- wger/urls.py | 4 ---- 10 files changed, 9 insertions(+), 40 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 5f8e8ef91..60dcf0c80 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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 diff --git a/requirements.txt b/requirements.txt index 7eb82b94e..754a27542 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/wger/core/templates/navigation.html b/wger/core/templates/navigation.html index 5c3295fd7..ab874d2fe 100644 --- a/wger/core/templates/navigation.html +++ b/wger/core/templates/navigation.html @@ -203,7 +203,7 @@ {% if not trainer_identity %}
  • - + {% trans "Logout" %} diff --git a/wger/core/templates/user/delete_account.html b/wger/core/templates/user/delete_account.html index 14b7c40de..08caffa43 100644 --- a/wger/core/templates/user/delete_account.html +++ b/wger/core/templates/user/delete_account.html @@ -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 %} diff --git a/wger/core/templates/user/login.html b/wger/core/templates/user/login.html index e9b5968c8..47636dbc2 100644 --- a/wger/core/templates/user/login.html +++ b/wger/core/templates/user/login.html @@ -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 %} - - - - -{% browserid_info %} {% endblock %} {% block content %} @@ -38,22 +33,4 @@ {% trans "Reset password" %}

    - -{% if not hide_persona %} -

    Persona

    - - -

    - {% 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 the - Persona website.{% endblocktrans %} -

    -{% endif %} {% endblock %} diff --git a/wger/core/templates/user/preferences.html b/wger/core/templates/user/preferences.html index fca6525c6..5ba594e5b 100644 --- a/wger/core/templates/user/preferences.html +++ b/wger/core/templates/user/preferences.html @@ -123,7 +123,7 @@ $(function() { -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/wger/core/views/user.py b/wger/core/views/user.py index 7dd9ee5ca..f335a810a 100644 --- a/wger/core/views/user.py +++ b/wger/core/views/user.py @@ -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') diff --git a/wger/settings.tpl b/wger/settings.tpl index e7f1f662c..9da3fc41a 100644 --- a/wger/settings.tpl +++ b/wger/settings.tpl @@ -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. diff --git a/wger/settings_global.py b/wger/settings_global.py index 1b681065e..abba0a87b 100644 --- a/wger/settings_global.py +++ b/wger/settings_global.py @@ -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' ) diff --git a/wger/urls.py b/wger/urls.py index 5df93110e..3bf632d1b 100644 --- a/wger/urls.py +++ b/wger/urls.py @@ -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/$',