Remove custom logic for preventing password change for 'chuck'
upstream now handles this
This commit is contained in:
parent
1e06066353
commit
2a34243e33
|
@ -8,7 +8,7 @@ def includeme(config):
|
||||||
|
|
||||||
# core views
|
# core views
|
||||||
config.include('rattail_demo.web.views.common')
|
config.include('rattail_demo.web.views.common')
|
||||||
config.include('rattail_demo.web.views.auth')
|
config.include('tailbone.views.auth')
|
||||||
config.include('tailbone.views.progress')
|
config.include('tailbone.views.progress')
|
||||||
config.include('tailbone.views.tables')
|
config.include('tailbone.views.tables')
|
||||||
|
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""
|
|
||||||
Auth views
|
|
||||||
"""
|
|
||||||
|
|
||||||
from __future__ import unicode_literals, absolute_import
|
|
||||||
|
|
||||||
from tailbone.views import auth as base
|
|
||||||
|
|
||||||
|
|
||||||
class AuthenticationView(base.AuthenticationView):
|
|
||||||
"""
|
|
||||||
Prevent password change for 'chuck' user
|
|
||||||
"""
|
|
||||||
|
|
||||||
def change_password(self):
|
|
||||||
if self.request.user and self.request.user.username == 'chuck':
|
|
||||||
self.request.session.flash("Cannot change password for 'chuck' in Rattail Demo")
|
|
||||||
return self.redirect(self.request.get_referrer())
|
|
||||||
return super(AuthenticationView, self).change_password()
|
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
|
||||||
AuthenticationView.defaults(config)
|
|
Loading…
Reference in a new issue