Merge pull request #4213 from betagouv/fix_manager_reset_password
Corriger un bug dans le manager concernant le reset de password
This commit is contained in:
commit
132900cca2
1 changed files with 2 additions and 2 deletions
|
@ -47,7 +47,7 @@ class Administrateur < ApplicationRecord
|
||||||
def registration_state
|
def registration_state
|
||||||
if active?
|
if active?
|
||||||
'Actif'
|
'Actif'
|
||||||
elsif reset_password_period_valid?
|
elsif user.reset_password_period_valid?
|
||||||
'En attente'
|
'En attente'
|
||||||
else
|
else
|
||||||
'Expiré'
|
'Expiré'
|
||||||
|
@ -55,7 +55,7 @@ class Administrateur < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def invitation_expired?
|
def invitation_expired?
|
||||||
!active && !reset_password_period_valid?
|
!active && !user.reset_password_period_valid?
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.reset_password(reset_password_token, password)
|
def self.reset_password(reset_password_token, password)
|
||||||
|
|
Loading…
Reference in a new issue