Changeset 9123 for main/waeup.kofa/trunk/src/waeup/kofa/browser
- Timestamp:
- 30 Aug 2012, 06:08:34 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r9087 r9123 40 40 IPrincipalRoleManager, IPrincipalRoleMap) 41 41 from zope.session.interfaces import ISession 42 from zope.password.interfaces import IPasswordManager 42 43 from waeup.kofa.browser import ( 43 44 KofaPage, KofaForm, KofaEditFormPage, KofaAddFormPage, … … 206 207 self.redirect(self.camefrom) 207 208 return 209 # Display appropriate flash message if credentials are correct 210 # but student has been deactivated. 211 login = self.request.form['form.login'] 212 if len(login) == 8 and grok.getSite()['students'].has_key(login): 213 student = grok.getSite()['students'][ 214 self.request.form['form.login']] 215 password = self.request.form['form.password'] 216 passwordmanager = getUtility(IPasswordManager, 'SSHA') 217 if passwordmanager.checkPassword(student.password, password): 218 self.flash(_('Your account has been deactivated.')) 219 return 208 220 self.flash(_('You entered invalid credentials.')) 209 221
Note: See TracChangeset for help on using the changeset viewer.