Ignore:
Timestamp:
22 Aug 2010, 14:26:01 (14 years ago)
Author:
uli
Message:
  • Remove trash.
  • Fix principal-factory/principal interaction.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/jambtables/authentication.py

    r5462 r5464  
    5252    grok.implements(IApplicantPrincipalInfo)
    5353
    54     # def __init__(self, id, title, description):
    55     # def __init__(self, reg_no, access_code):
    5654    def __init__(self, access_code, jamb_reg_no=None):
    5755        self.id = principal_id(access_code, jamb_reg_no)
     
    7270    grok.implements(IApplicantPrincipal)
    7371
    74     def __init__(self, reg_no, access_code):
    75         self.id = '%s-%s' % (reg_no, access_code)
     72    def __init__(self, access_code, reg_no, prefix=None):
     73        self.id = principal_id(access_code, reg_no)
     74        if prefix is not None:
     75            self.id = '%s.%s' % (prefix, self.id)
    7676        self.title = u'Applicant'
    7777        self.description = u'An applicant'
     
    100100    def __call__(self, authentication):
    101101        principal = ApplicantPrincipal(
    102             authentication.prefix + self.info.reg_no,
    103             self.info.access_code
     102            self.info.access_code,
     103            self.info.reg_no,
     104            authentication.prefix,
    104105            )
    105106        notify(
Note: See TracChangeset for help on using the changeset viewer.