mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-26 06:32:26 +00:00
Altération de la méthode has_access pour prendre en compte la vérification
This commit is contained in:
parent
00f53a8d9a
commit
01475bd786
1 changed files with 5 additions and 1 deletions
|
@ -414,7 +414,11 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser,
|
|||
|
||||
def has_access(self):
|
||||
""" Renvoie si un utilisateur a accès à internet """
|
||||
return (self.state == User.STATE_ACTIVE and
|
||||
if(OptionalUser.get_cached_value('mail_verification') and not self.verified and self.verification_deadline is not None and datetime.now() > self.verification_deadline):
|
||||
verified = False
|
||||
else:
|
||||
verified = True
|
||||
return (verified and self.state == User.STATE_ACTIVE and
|
||||
not self.is_ban() and
|
||||
(self.is_connected() or self.is_whitelisted()))
|
||||
|
||||
|
|
Loading…
Reference in a new issue