Ignore:
Timestamp:
6 Jun 2014, 08:55:12 (11 years ago)
Author:
Henrik Bettermann
Message:

Redirect to login page after using password mandate.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/mandates
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/mandates/browser.py

    r8848 r11680  
    4343        msg = mandate.execute()
    4444        self.flash(msg)
    45         self.redirect(self.url(self.context))
    4645        return
    4746
    4847    def render(self):
    49         self.redirect(self.url(self.context))
     48        self.redirect(self.url(self.context, 'login'))
    5049        return
  • main/waeup.kofa/trunk/src/waeup/kofa/mandates/mandate.py

    r8860 r11680  
    7070            msg = _('Mandate expired.')
    7171        if self._setPassword():
    72             msg = _('Password has been successfully set. '
    73                     'Proceed to the login page and enter your credentials.')
     72            msg = _('Password has been successfully set.')
    7473            username = IUserAccount(self.params['user']).name
    7574            grok.getSite().logger.info(
  • main/waeup.kofa/trunk/src/waeup/kofa/mandates/tests.py

    r8910 r11680  
    104104        msg = mandate.execute()
    105105        # Password has been set.
    106         self.assertEqual(msg, 'Password has been successfully set. Proceed to '
    107             'the login page and enter your credentials.')
     106        self.assertEqual(msg, 'Password has been successfully set.')
    108107        self.assertTrue(IUserAccount(student).checkPassword('mypwd1'))
    109108        # All mandates have been removed.
     
    123122        msg = mandate.execute()
    124123        # Password has been set.
    125         self.assertEqual(msg, 'Password has been successfully set. Proceed to '
    126             'the login page and enter your credentials.')
     124        self.assertEqual(msg, 'Password has been successfully set.')
    127125        self.assertTrue(IUserAccount(officer).checkPassword('mypwd1'))
    128126        logfile = os.path.join(
     
    140138        msg = mandate.execute()
    141139        # Password has been set.
    142         self.assertEqual(msg, 'Password has been successfully set. Proceed to '
    143             'the login page and enter your credentials.')
     140        self.assertEqual(msg, 'Password has been successfully set.')
    144141        self.assertTrue(IUserAccount(applicant).checkPassword('mypwd1'))
    145142        logfile = os.path.join(
     
    172169            % mandate.mandate_id)
    173170        # Password has been set.
    174         self.assertTrue('Password has been successfully set. Proceed to '
    175                         'the login page and enter your credentials.'
     171        self.assertTrue('Password has been successfully set.'
    176172            in self.browser.contents)
    177173        self.assertTrue(IUserAccount(student).checkPassword('mypwd1'))
    178174        # All mandates have been removed.
    179175        self.assertEqual(len(self.app['mandates'].keys()), 0)
     176        # We redirect to login page not to the frontpage.
     177        self.assertEqual(self.browser.url, 'http://localhost/app/login')
Note: See TracChangeset for help on using the changeset viewer.