Fix password reset problem (was missing error_handler)
This commit is contained in:
parent
844999b0ab
commit
152f5e7ba0
1 changed files with 12 additions and 0 deletions
|
@ -294,6 +294,7 @@ https://admin.fedoraproject.org/accounts/user/verifyemail/%s
|
|||
|
||||
# TODO: This took about 55 seconds for me to load - might want to limit it to the right accounts (systems user, accounts group)
|
||||
@identity.require(turbogears.identity.not_anonymous())
|
||||
@error_handler(error)
|
||||
@expose(template="fas.templates.user.list", allow_json=True)
|
||||
def list(self, search="a*"):
|
||||
'''List users
|
||||
|
@ -317,6 +318,7 @@ https://admin.fedoraproject.org/accounts/user/verifyemail/%s
|
|||
return dict(people=people, search=search)
|
||||
|
||||
@identity.require(turbogears.identity.not_anonymous())
|
||||
@error_handler(error)
|
||||
@expose(format='json')
|
||||
def email_list(self, search='*'):
|
||||
re_search = re.sub(r'\*', r'%', search).lower()
|
||||
|
@ -327,6 +329,7 @@ https://admin.fedoraproject.org/accounts/user/verifyemail/%s
|
|||
return dict(emails=emails)
|
||||
|
||||
@identity.require(turbogears.identity.not_anonymous())
|
||||
@error_handler(error)
|
||||
@expose(template='fas.templates.user.verifyemail')
|
||||
def verifyemail(self, token, cancel=False):
|
||||
username = turbogears.identity.current.user_name
|
||||
|
@ -347,6 +350,7 @@ https://admin.fedoraproject.org/accounts/user/verifyemail/%s
|
|||
return dict(person=person, token=token)
|
||||
|
||||
@identity.require(turbogears.identity.not_anonymous())
|
||||
@error_handler(error)
|
||||
@expose()
|
||||
def setemail(self, token):
|
||||
username = turbogears.identity.current.user_name
|
||||
|
@ -369,6 +373,7 @@ https://admin.fedoraproject.org/accounts/user/verifyemail/%s
|
|||
turbogears.redirect('/user/view/%s' % username)
|
||||
return dict()
|
||||
|
||||
@error_handler(error)
|
||||
@expose(template='fas.templates.user.new')
|
||||
def new(self):
|
||||
if turbogears.identity.not_anonymous():
|
||||
|
@ -443,6 +448,7 @@ forward to working with you!
|
|||
return dict()
|
||||
|
||||
@identity.require(turbogears.identity.not_anonymous())
|
||||
@error_handler(error)
|
||||
@expose(template="fas.templates.user.changepass")
|
||||
def changepass(self):
|
||||
return dict()
|
||||
|
@ -475,6 +481,7 @@ forward to working with you!
|
|||
turbogears.flash(_("Your password could not be changed."))
|
||||
return dict()
|
||||
|
||||
@error_handler(error)
|
||||
@expose(template="fas.templates.user.resetpass")
|
||||
def resetpass(self):
|
||||
if turbogears.identity.not_anonymous():
|
||||
|
@ -483,6 +490,7 @@ forward to working with you!
|
|||
return dict()
|
||||
|
||||
#TODO: Validate
|
||||
@error_handler(error)
|
||||
@expose(template="fas.templates.user.resetpass")
|
||||
def sendtoken(self, username, email, encrypted=False):
|
||||
import turbomail
|
||||
|
@ -549,6 +557,7 @@ https://admin.fedoraproject.org/accounts/user/verifypass/%(user)s/%(token)s
|
|||
turbogears.redirect('/login')
|
||||
return dict()
|
||||
|
||||
@error_handler(error)
|
||||
@expose(template="fas.templates.user.newpass")
|
||||
# TODO: Validator
|
||||
def newpass(self, username, token, password=None, passwordcheck=None):
|
||||
|
@ -564,6 +573,7 @@ https://admin.fedoraproject.org/accounts/user/verifypass/%(user)s/%(token)s
|
|||
return dict()
|
||||
return dict(person=person, token=token)
|
||||
|
||||
@error_handler(error)
|
||||
@expose(template="fas.templates.user.verifypass")
|
||||
# TODO: Validator
|
||||
def verifypass(self, username, token, cancel=False):
|
||||
|
@ -583,6 +593,7 @@ https://admin.fedoraproject.org/accounts/user/verifypass/%(user)s/%(token)s
|
|||
return dict()
|
||||
return dict(person=person, token=token)
|
||||
|
||||
@error_handler(error)
|
||||
@expose()
|
||||
@validate(validators=UserResetPassword())
|
||||
def setnewpass(self, username, token, password, passwordcheck):
|
||||
|
@ -607,6 +618,7 @@ https://admin.fedoraproject.org/accounts/user/verifypass/%(user)s/%(token)s
|
|||
return dict()
|
||||
|
||||
@identity.require(turbogears.identity.not_anonymous())
|
||||
@error_handler(error)
|
||||
@expose(template="genshi-text:fas.templates.user.cert", format="text", content_type='text/plain; charset=utf-8')
|
||||
def gencert(self):
|
||||
username = turbogears.identity.current.user_name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue