Ignore:
Timestamp:
30 Mar 2011, 10:43:52 (14 years ago)
Author:
uli
Message:

Make login view pass the tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py

    r5891 r5894  
    300300            return
    301301
    302         if self.request.principal.id != 'zope.anybody':
    303             print self.request.principal
    304             # If record does not exist: create
    305             # Then: redirect to record...
    306             return
    307         self.flash('Entered credentials are invalid')
     302        if self.request.principal.id == 'zope.anybody':
     303            self.flash('Entered credentials are invalid')
     304            return
     305
     306        if not IApplicantPrincipal.providedBy(self.request.principal):
     307            # Don't care if user is already authenticated as non-applicant
     308            return
     309
     310        print self.request.principal
     311        # If record does not exist: create
     312        # Then: redirect to record...
    308313        return
    309314
Note: See TracChangeset for help on using the changeset viewer.