Fix line in fasClient (not touching much else there for now), add verifyemail.html, add commented out new password enforcement.

This commit is contained in:
Ricky Zhou (周家杰) 2008-03-11 23:25:09 -04:00
parent 1970a3ca28
commit 61c4632be0
3 changed files with 26 additions and 1 deletions

View file

@ -466,7 +466,7 @@ class MakeShellAccounts(BaseClient):
sorted.sort()
for person in sorted:
email_file.write("%s: %s\n" % (person, self.emails[person]))
usernames = self.usernames()
usernames = self.usernames
for group in self.groups:
name = group['name']
members = {}

View file

@ -0,0 +1,21 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="../master.html" />
<head>
<title>${_('Confirm Email Change Request')}</title>
</head>
<body>
<h2>${_('Confirm Email Change Request')}</h2>
<form action="${tg.url('/user/setemail/%s') % token}" method="post">
<div>
<p>
Do you really want to change your email to: ${person.unverified_email} ?
</p>
<input type="submit" name="confirmation" id="confirmation" value="${_('Confirm')}" />
<input type="submit" value="${_('Cancel')}" />
</div>
</form>
</body>
</html>

View file

@ -458,6 +458,10 @@ forward to working with you!
if not person.password == crypt.crypt(currentpassword, person.password):
turbogears.flash('Your current password did not match')
return dict()
# TODO: Enable this when we need to.
#if currentpassword == password:
# turbogears.flash('Your new password cannot be the same as your old one.')
# return dict()
newpass = generate_password(password)
try:
person.password = newpass['hash']