- Timestamp:
- 3 Sep 2025, 07:38:18 (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/authentication.py
r15606 r18166 20 20 """ 21 21 import grok 22 importtime22 from datetime import datetime 23 23 from zope.component import getUtility 24 24 from zope.password.interfaces import IPasswordManager … … 109 109 passwordmanager = getUtility(IPasswordManager, 'SSHA') 110 110 self.context.password = passwordmanager.encodePassword(password) 111 self.context.password_updated = datetime.utcnow() 111 112 112 113 def checkPassword(self, password): … … 114 115 students, the temporary password was set by officers or 115 116 the parents_password was set by parents. 116 We additionally check if student account has been suspended 117 or if the portal is blocked.117 We additionally check if student account has been suspended, 118 if the portal is blocked or the password has expired. 118 119 """ 119 120 try: … … 137 138 if self.context.suspended == True: 138 139 return False 140 if self.context.password_expired: 141 return False 139 142 return passwordmanager.checkPassword(self.context.password, password) 140 143
Note: See TracChangeset for help on using the changeset viewer.
