Changeset 5452
- Timestamp:
- 18 Aug 2010, 12:23:43 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/jambtables/authentication.py
r5447 r5452 38 38 IApplicantPrincipalInfo, IApplicantPrincipal, IApplicantSessionCredentials, 39 39 IJAMBApplicantSessionCredentials) 40 from waeup.sirp.jambtables.util import get_applicant_data 40 from waeup.sirp.jambtables.util import get_applicant_data, application_exists 41 41 from waeup.sirp.accesscodes import get_access_code 42 42 … … 212 212 credentials = None 213 213 214 print "CRED2: %s, %s" % (access_code, jamb_reg_no)215 214 if access_code and jamb_reg_no: 216 215 credentials = JAMBApplicantCredentials( … … 228 227 if not credentials: 229 228 return None 230 if credentials.getJAMBRegNo() is not None: 231 return {'accesscode': credentials.getAccessCode(), 232 'jambregno': credentials.getJAMBRegNo()} 233 return {'accesscode': credentials.getAccessCode()} 229 if not IJAMBApplicantSessionCredentials.providedBy(credentials): 230 # Entered credentials are ordinary applicant credentials, 231 # not JAMB-screened applicant credentials 232 return {'accesscode': credentials.getAccessCode()} 233 return {'accesscode': credentials.getAccessCode(), 234 'jambregno': credentials.getJAMBRegNo()} 235 234 236 235 237 … … 255 257 # XXX: log this. 256 258 return None 259 if credentials['jambregno'] is not None: 260 # applications of JAMB applicants must exist already 261 if not application_exists(credentials['jambregno']): 262 return None 257 263 return ApplicantPrincipalInfo( 258 264 credentials['accesscode'], credentials['jambregno']
Note: See TracChangeset for help on using the changeset viewer.