diff --git a/mediagoblin/auth/routing.py b/mediagoblin/auth/routing.py
index 2a6abb47..7a688a49 100644
--- a/mediagoblin/auth/routing.py
+++ b/mediagoblin/auth/routing.py
@@ -25,9 +25,4 @@ auth_routes = [
('mediagoblin.auth.verify_email', '/verify_email/',
'mediagoblin.auth.views:verify_email'),
('mediagoblin.auth.resend_verification', '/resend_verification/',
- 'mediagoblin.auth.views:resend_activation'),
- ('mediagoblin.auth.forgot_password', '/forgot_password/',
- 'mediagoblin.auth.views:forgot_password'),
- ('mediagoblin.auth.verify_forgot_password',
- '/forgot_password/verify/',
- 'mediagoblin.auth.views:verify_forgot_password')]
+ 'mediagoblin.auth.views:resend_activation')]
diff --git a/mediagoblin/auth/tools.py b/mediagoblin/auth/tools.py
index 579775ff..20c1f5c2 100644
--- a/mediagoblin/auth/tools.py
+++ b/mediagoblin/auth/tools.py
@@ -101,38 +101,6 @@ def send_verification_email(user, request, email=None,
rendered_email)
-EMAIL_FP_VERIFICATION_TEMPLATE = (
- u"{uri}?"
- u"token={fp_verification_key}")
-
-
-def send_fp_verification_email(user, request):
- """
- Send the verification email to users to change their password.
-
- Args:
- - user: a user object
- - request: the request
- """
- fp_verification_key = get_timed_signer_url('mail_verification_token') \
- .dumps(user.id)
-
- rendered_email = render_template(
- request, 'mediagoblin/auth/fp_verification_email.txt',
- {'username': user.username,
- 'verification_url': EMAIL_FP_VERIFICATION_TEMPLATE.format(
- uri=request.urlgen('mediagoblin.auth.verify_forgot_password',
- qualified=True),
- fp_verification_key=fp_verification_key)})
-
- # TODO: There is no error handling in place
- send_email(
- mg_globals.app_config['email_sender_address'],
- [user.email],
- 'GNU MediaGoblin - Change forgotten password!',
- rendered_email)
-
-
def basic_extra_validation(register_form, *args):
users_with_username = User.query.filter_by(
username=register_form.username.data).count()
@@ -196,7 +164,10 @@ def check_auth_enabled():
def no_auth_logout(request):
- """Log out the user if authentication_disabled, but don't delete the messages"""
+ """
+ Log out the user if no authentication is enabled, but don't delete
+ the messages
+ """
if not mg_globals.app.auth and 'user_id' in request.session:
del request.session['user_id']
request.session.save()
diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py
index d114833c..8563195f 100644
--- a/mediagoblin/auth/views.py
+++ b/mediagoblin/auth/views.py
@@ -24,11 +24,8 @@ from mediagoblin.tools.response import render_to_response, redirect, render_404
from mediagoblin.tools.translate import pass_to_ugettext as _
from mediagoblin.tools.mail import email_debug_message
from mediagoblin.tools.pluginapi import hook_handle
-from mediagoblin.auth import forms as auth_forms
from mediagoblin.auth.tools import (send_verification_email, register_user,
- send_fp_verification_email,
check_login_simple)
-from mediagoblin import auth
@allow_registration
diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py
index 388940b4..0832f0db 100644
--- a/mediagoblin/edit/forms.py
+++ b/mediagoblin/edit/forms.py
@@ -81,6 +81,7 @@ class EditAttachmentsForm(wtforms.Form):
attachment_file = wtforms.FileField(
'File')
+
class EditCollectionForm(wtforms.Form):
title = wtforms.TextField(
_('Title'),
diff --git a/mediagoblin/edit/routing.py b/mediagoblin/edit/routing.py
index 75f5a6d8..a2d03d26 100644
--- a/mediagoblin/edit/routing.py
+++ b/mediagoblin/edit/routing.py
@@ -24,8 +24,6 @@ add_route('mediagoblin.edit.account', '/edit/account/',
'mediagoblin.edit.views:edit_account')
add_route('mediagoblin.edit.delete_account', '/edit/account/delete/',
'mediagoblin.edit.views:delete_account')
-add_route('mediagoblin.edit.pass', '/edit/password/',
- 'mediagoblin.edit.views:change_pass')
add_route('mediagoblin.edit.verify_email', '/edit/verify_email/',
'mediagoblin.edit.views:verify_email')
add_route('mediagoblin.edit.email', '/edit/email/',
diff --git a/mediagoblin/edit/views.py b/mediagoblin/edit/views.py
index be19bcda..da186758 100644
--- a/mediagoblin/edit/views.py
+++ b/mediagoblin/edit/views.py
@@ -23,7 +23,6 @@ from werkzeug.utils import secure_filename
from mediagoblin import messages
from mediagoblin import mg_globals
-from mediagoblin import auth
from mediagoblin.auth import tools as auth_tools
from mediagoblin.edit import forms
from mediagoblin.edit.lib import may_edit_media
@@ -338,46 +337,6 @@ def edit_collection(request, collection):
'form': form})
-@require_active_login
-def change_pass(request):
- # If no password authentication, no need to change your password
- if 'pass_auth' not in request.template_env.globals:
- return redirect(request, 'index')
-
- form = forms.ChangePassForm(request.form)
- user = request.user
-
- if request.method == 'POST' and form.validate():
-
- if not auth.check_password(
- form.old_password.data, user.pw_hash):
- form.old_password.errors.append(
- _('Wrong password'))
-
- return render_to_response(
- request,
- 'mediagoblin/edit/change_pass.html',
- {'form': form,
- 'user': user})
-
- # Password matches
- user.pw_hash = auth.gen_password_hash(
- form.new_password.data)
- user.save()
-
- messages.add_message(
- request, messages.SUCCESS,
- _('Your password was changed successfully'))
-
- return redirect(request, 'mediagoblin.edit.account')
-
- return render_to_response(
- request,
- 'mediagoblin/edit/change_pass.html',
- {'form': form,
- 'user': user})
-
-
def verify_email(request):
"""
Email verification view for changing email address
diff --git a/mediagoblin/plugins/basic_auth/__init__.py b/mediagoblin/plugins/basic_auth/__init__.py
index 33a554b0..64564c7f 100644
--- a/mediagoblin/plugins/basic_auth/__init__.py
+++ b/mediagoblin/plugins/basic_auth/__init__.py
@@ -13,17 +13,45 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see