Projet

Général

Profil

0001-auth_fc-get-a-lock-on-the-sub-during-account-creatio.patch

Paul Marillonnet, 13 septembre 2022 16:33

Télécharger (1,12 ko)

Voir les différences:

Subject: [PATCH] auth_fc: get a lock on the sub during account creation
 (#65411)

 src/authentic2_auth_fc/views.py | 5 +++++
 1 file changed, 5 insertions(+)
src/authentic2_auth_fc/views.py
333 333

  
334 334
    def link(self, request):
335 335
        '''Request an access grant code and associate it to the current user'''
336

  
337
        Lock.lock_identifier(identifier=self.sub)
338

  
336 339
        try:
337 340
            self.fc_account, created = models.FcAccount.objects.get_or_create(
338 341
                sub=self.sub,
......
450 453
            user = User.objects.create(ou=get_default_ou())
451 454
            created = True
452 455

  
456
        Lock.lock_identifier(identifier=sub)
457

  
453 458
        try:
454 459
            if created:
455 460
                user.set_unusable_password()
456
-