mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-30 08:32:26 +00:00
Merge branch 'hotfix_autocreate' into 'dev'
Hotfix autocreate See merge request federez/re2o!380
This commit is contained in:
commit
81b7a7c4af
1 changed files with 2 additions and 1 deletions
|
@ -696,7 +696,8 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser,
|
||||||
def autoregister_machine(self, mac_address, nas_type):
|
def autoregister_machine(self, mac_address, nas_type):
|
||||||
""" Fonction appellée par freeradius. Enregistre la mac pour
|
""" Fonction appellée par freeradius. Enregistre la mac pour
|
||||||
une machine inconnue sur le compte de l'user"""
|
une machine inconnue sur le compte de l'user"""
|
||||||
if Machine.can_create(self):
|
allowed, _message = Machine.can_create(self, self.id)
|
||||||
|
if not allowed:
|
||||||
return False, _("Maximum number of registered machines reached.")
|
return False, _("Maximum number of registered machines reached.")
|
||||||
if not nas_type:
|
if not nas_type:
|
||||||
return False, _("Re2o doesn't know wich machine type to assign.")
|
return False, _("Re2o doesn't know wich machine type to assign.")
|
||||||
|
|
Loading…
Reference in a new issue