Changeset 3832
- Timestamp:
- 06/13/08 04:12:52 (5 months ago)
- Files:
-
- accountmanagerplugin/trunk/acct_mgr/templates/login.html (modified) (1 diff)
- accountmanagerplugin/trunk/acct_mgr/templates/prefs_account.html (modified) (2 diffs)
- accountmanagerplugin/trunk/acct_mgr/templates/register.html (modified) (1 diff)
- accountmanagerplugin/trunk/acct_mgr/templates/reset_password.html (modified) (1 diff)
- accountmanagerplugin/trunk/acct_mgr/templates/verify_email.html (modified) (1 diff)
- accountmanagerplugin/trunk/acct_mgr/tests/db.py (modified) (1 diff)
- accountmanagerplugin/trunk/acct_mgr/tests/functional (added)
- accountmanagerplugin/trunk/acct_mgr/tests/functional/__init__.py (added)
- accountmanagerplugin/trunk/acct_mgr/tests/functional/smtpd.py (added)
- accountmanagerplugin/trunk/acct_mgr/tests/functional/testcases.py (added)
- accountmanagerplugin/trunk/acct_mgr/tests/functional/testenv.py (added)
- accountmanagerplugin/trunk/acct_mgr/tests/functional/tester.py (added)
- accountmanagerplugin/trunk/acct_mgr/tests/__init__.py (modified) (2 diffs)
- accountmanagerplugin/trunk/acct_mgr/web_ui.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
accountmanagerplugin/trunk/acct_mgr/templates/login.html
r3727 r3832 25 25 </div> 26 26 27 <form method="post" action="">27 <form method="post" id="acctmgr_loginform" action=""> 28 28 <input type="hidden" name="referer" value="${referer}" /> 29 29 <div> accountmanagerplugin/trunk/acct_mgr/templates/prefs_account.html
r3731 r3832 20 20 </div> 21 21 22 <form method="post" action="" 22 <form method="post" action="" id="acctmgr_delete_account" 23 23 onsubmit="return confirm('Are you sure you want to delete your account?');"> 24 24 <div class="field"> … … 44 44 <h2>Error</h2> 45 45 <p>$account.error</p> 46 </div>47 <div class="system-message" py:if="account.force_change_passwd">48 <h2>Immediate action required</h2>49 <p>You are required to change password because of a recent50 password change request.</p>51 <p><strong>Please change your password now.</strong></p>52 46 </div> 53 47 <p py:if="account.message">$account.message</p> accountmanagerplugin/trunk/acct_mgr/templates/register.html
r3727 r3832 24 24 </div> 25 25 26 <form method="post" action="">26 <form method="post" id="acctmgr_registerform" action=""> 27 27 <fieldset> 28 28 <legend>Required</legend> accountmanagerplugin/trunk/acct_mgr/templates/reset_password.html
r3727 r3832 41 41 <p py:if="reset.message">$reset.message</p> 42 42 43 <form method="post" action="">43 <form method="post" id="acctmgr_passwd_reset" action=""> 44 44 <div> 45 45 <label>Username: accountmanagerplugin/trunk/acct_mgr/templates/verify_email.html
r3799 r3832 26 26 is incorrect.</p> 27 27 28 <form method="post" action="" >28 <form method="post" action="" id="acctmgr_verify_email"> 29 29 <div> 30 30 <label for="token">Verification Token:</label> accountmanagerplugin/trunk/acct_mgr/tests/db.py
r2120 r3832 22 22 def setUp(self): 23 23 #self.basedir = os.path.realpath(tempfile.mkdtemp()) 24 self.env = EnvironmentStub( )24 self.env = EnvironmentStub(enable=['trac.*', 'acct_mgr.*']) 25 25 self.env.config.set('account-manager', 'password_store', 26 26 'SessionStore') accountmanagerplugin/trunk/acct_mgr/tests/__init__.py
r2120 r3832 12 12 import doctest 13 13 import unittest 14 try: 15 import twill, subprocess 16 INCLUDE_FUNCTIONAL_TESTS = True 17 except ImportError: 18 INCLUDE_FUNCTIONAL_TESTS = False 14 19 15 20 def suite(): … … 18 23 suite.addTest(htfile.suite()) 19 24 suite.addTest(db.suite()) 25 if INCLUDE_FUNCTIONAL_TESTS: 26 from acct_mgr.tests.functional import suite as functional_suite 27 suite.addTest(functional_suite()) 20 28 return suite 21 29 22 30 if __name__ == '__main__': 31 import sys 32 if '--skip-functional-tests' in sys.argv: 33 sys.argv.remove('--skip-functional-tests') 34 INCLUDE_FUNCTIONAL_TESTS = False 23 35 unittest.main(defaultTest='suite') accountmanagerplugin/trunk/acct_mgr/web_ui.py
r3799 r3832 214 214 data = {'delete_enabled': delete_enabled} 215 215 force_change_password = req.session.get('force_change_passwd', False) 216 if force_change_password:217 data['force_change_passwd'] = True218 216 if req.method == 'POST': 219 217 if action == 'save': 220 218 data.update(self._do_change_password(req)) 221 219 if force_change_password: 222 data['force_change_passwd'] = False223 220 del(req.session['force_change_passwd']) 224 221 req.session.save() 222 chrome.add_notice(req, MessageWrapper(tag( 223 "Thank you for taking the time to update your password." 224 ))) 225 force_change_password = False 225 226 elif action == 'delete' and delete_enabled: 226 227 data.update(self._do_delete(req)) 227 228 else: 228 229 data.update({'error': 'Invalid action'}) 230 if force_change_password: 231 chrome.add_warning(req, MessageWrapper(tag( 232 "You are required to change password because of a recent " 233 "password change request. ", 234 tag.b("Please change your password now.")))) 229 235 return data 230 236 … … 509 515 510 516 def pre_process_request(self, req, handler): 517 if not req.session.authenticated: 518 # Anonymous users should register and perms should be tweaked so 519 # that anonymous users can't edit wiki pages and change or create 520 # tickets. As such, this email verifying code won't be used on them 521 return handler 511 522 if handler is not self and 'email_verification_token' in req.session: 512 523 chrome.add_warning(req, MessageWrapper(tag.span( … … 518 529 519 530 def post_process_request(self, req, template, data, content_type): 531 if not req.session.authenticated: 532 # Anonymous users should register and perms should be tweaked so 533 # that anonymous users can't edit wiki pages and change or create 534 # tickets. As such, this email verifying code won't be used on them 535 return template, data, content_type 520 536 if req.session.get('email') != req.session.get('email_verification_sent_to'): 521 537 req.session['email_verification_token'] = self._gen_token()
