Changeset 16550


Ignore:
Timestamp:
14 Jul 2021, 06:40:53 (3 years ago)
Author:
Henrik Bettermann
Message:
 
Location:
main/waeup.kofa/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/CHANGES.txt

    r16545 r16550  
    441.7.2.dev0 (unreleased)
    55=======================
     6
     7* Forward credentials to login page after password reset request.
    68
    79* Enable applicants to upload also additional jpg files.
  • main/waeup.kofa/trunk/src/waeup/kofa/mandates/mandate.py

    r16059 r16550  
    2222import hashlib
    2323import os
     24from urllib import urlencode
    2425from datetime import datetime, timedelta
    2526from grok import index
     
    7677                    'Login with your new password.')
    7778            username = IUserAccount(self.params['user']).name
     79            password = self.params['password']
    7880            grok.getSite().logger.info(
    7981                'PasswordMandate used: %s ' % username)
    80             redirect_path = '/login'
     82            args = {'login':username, 'password':password}
     83            redirect_path = '/login?%s' % urlencode(args)
    8184        del self.__parent__[self.mandate_id]
    8285        return msg, redirect_path
  • main/waeup.kofa/trunk/src/waeup/kofa/mandates/tests.py

    r15609 r16550  
    131131        self.assertEqual(msg,
    132132            'Password has been successfully set. Login with your new password.')
    133         self.assertEqual(redirect_path, '/login')
     133        self.assertEqual(redirect_path, '/login?login=K1000000&password=mypwd1')
    134134        self.assertTrue(IUserAccount(student).checkPassword('mypwd1'))
    135135        # All mandates have been removed.
     
    151151        self.assertEqual(msg,
    152152            'Password has been successfully set. Login with your new password.')
    153         self.assertEqual(redirect_path, '/login')
     153        self.assertEqual(redirect_path, '/login?login=bob&password=HgtuZZZ8')
    154154        self.assertTrue(IUserAccount(officer).checkPassword(SECRET))
    155155        logfile = os.path.join(
     
    169169        self.assertEqual(msg,
    170170            'Password has been successfully set. Login with your new password.')
    171         self.assertEqual(redirect_path, '/login')
     171        self.assertEqual(redirect_path, '/login?login=abc&password=mypwd1')
    172172        self.assertTrue(IUserAccount(applicant).checkPassword('mypwd1'))
    173173        logfile = os.path.join(
     
    226226        self.assertEqual(len(self.app['mandates'].keys()), 0)
    227227        # We redirect to login page not to the frontpage.
    228         self.assertEqual(self.browser.url, 'http://localhost/app/login')
     228        self.assertEqual(self.browser.url, 'http://localhost/app/login?login=K1000000&password=mypwd1')
    229229        # Mandate has been deleted
    230230        self.browser.open('http://localhost/app/mandate?mandate_id=%s'
Note: See TracChangeset for help on using the changeset viewer.