summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicky Zhou <ricky@fedoraproject.org>2008-03-13 19:43:12 (GMT)
committerRicky Zhou <ricky@fedoraproject.org>2008-03-13 19:43:12 (GMT)
commit152f5e7ba08220e165e759c5306835a08ae05e98 (patch)
tree8c612efc3733bb14c489bc0e34ca0e886d94ec11
parent844999b0ab96a329fb2b4f72a860b5bdf201ec2d (diff)
downloadfedora-infrastructure-152f5e7ba08220e165e759c5306835a08ae05e98.zip
fedora-infrastructure-152f5e7ba08220e165e759c5306835a08ae05e98.tar.gz
fedora-infrastructure-152f5e7ba08220e165e759c5306835a08ae05e98.tar.xz
Fix password reset problem (was missing error_handler)
-rw-r--r--fas/fas/user.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/fas/fas/user.py b/fas/fas/user.py
index 33e2ac6..ff93be8 100644
--- a/fas/fas/user.py
+++ b/fas/fas/user.py
@@ -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