From ae5ef6a3c5643e79eeebb6e65b1558731d82ed94 Mon Sep 17 00:00:00 2001 From: Grizzly Date: Sat, 8 Dec 2018 22:20:31 +0000 Subject: [PATCH] =?UTF-8?q?Utilise=20l'acl=20pour=20la=20v=C3=A9rification?= =?UTF-8?q?=20de=20la=20possibilit=C3=A9=20de=20cr=C3=A9ation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- users/models.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/users/models.py b/users/models.py index 8703c978..7d7b43d4 100755 --- a/users/models.py +++ b/users/models.py @@ -696,9 +696,7 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser, """ Fonction appellée par freeradius. Enregistre la mac pour une machine inconnue sur le compte de l'user""" all_interfaces = self.user_interfaces() - if all_interfaces.count() > OptionalMachine.get_cached_value( - 'max_lambdauser_interfaces' - ): + if Machine.can_create(self): return False, _("Maximum number of registered machines reached.") if not nas_type: return False, _("Re2o doesn't know wich machine type to assign.")