Changeset 5462 for main/waeup.sirp/trunk/src/waeup/sirp/jambtables
- Timestamp:
- 22 Aug 2010, 11:43:39 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/jambtables/authentication.py
r5460 r5462 47 47 grok.permissions('waeup.Public') 48 48 49 class ApplicantAccount(Account):50 """An account for applicants.51 52 XXX: Very likely we do not need this at all.53 """54 def __init__(self, reg_no, ac):55 self.name = u'applicant'56 self.title = u'Applicant'57 self.description = u'Applicant'58 self.reg_no = reg_no59 self.access_code = ac60 roles = ['waeup.Applicant']61 self.setRoles(roles)62 63 def checkPassword(self, reg_no, ac):64 """Check whether the given credentials exist.65 66 `reg_no` is a JAMB registration number. `ac` an access code67 string like ``PUDE-23-1234567890``.68 """69 if self.reg_no != reg_no or self.access_code != ac:70 return False71 return True72 site = grok.getSite()73 if not reg_no in site['applications']:74 return False75 data = get_applicant_data(reg_no, ac)76 if data is None:77 return False78 return True79 80 49 class ApplicantPrincipalInfo(object): 81 50 """Infos about an applicant principal.
Note: See TracChangeset for help on using the changeset viewer.