From eaee6f91547f7c7ca1eb74c0a77774c8f66e663a Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Sat, 3 Sep 2011 12:14:04 +0200 Subject: [PATCH] remove the obligation to change the password --- openslides/default.settings.py | 1 - openslides/participant/api.py | 18 +----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/openslides/default.settings.py b/openslides/default.settings.py index 52f574b89..583d855d5 100644 --- a/openslides/default.settings.py +++ b/openslides/default.settings.py @@ -104,7 +104,6 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.locale.LocaleMiddleware', - 'participant.api.ChangePasswordMiddleware', ) ROOT_URLCONF = 'openslides.urls' diff --git a/openslides/participant/api.py b/openslides/participant/api.py index ba8030289..ed154ec45 100644 --- a/openslides/participant/api.py +++ b/openslides/participant/api.py @@ -10,23 +10,7 @@ :license: GNU GPL, see LICENSE for more details. """ -from django.contrib.auth.models import User, get_hexdigest -from django.shortcuts import redirect -from django.core.urlresolvers import reverse -from django.contrib import messages -from django.utils.translation import ugettext as _ - -class ChangePasswordMiddleware(object): - def process_request(self, request): - if request.user.is_authenticated() and "password_checked" not in request.session: - algo, salt, hsh = request.user.password.split('$') - bad_password = get_hexdigest(algo, salt, "%s%s" % (request.user.first_name, request.user.last_name)) - if hsh == bad_password: - messages.info(request, _('You have to change your Password.')) - if request.path_info != '/user/settings' and 'static' not in request.path_info: - return redirect(reverse('user_settings')) - else: - request.session["password_checked"] = True +from django.contrib.auth.models import User def gen_username(first_name, last_name):