feat(account): Use a setting to register VLANs automatically on registration
This commit is contained in:
parent
07192b14f7
commit
5e356f7302
2 changed files with 4 additions and 0 deletions
|
@ -242,6 +242,7 @@ DGSI_SUPERUSER_GROUP = credentials.get("SUPERUSER_GROUP", "dgnum_admins@sso.dgnu
|
|||
|
||||
VLAN_ID_MAX = 4094
|
||||
VLAN_ID_MIN = (VLAN_ID_MAX - 850) + 1
|
||||
VLAN_AUTOCONNECT = credentials.get("VLAN_AUTOCONNECT", False)
|
||||
|
||||
|
||||
###
|
||||
|
|
|
@ -184,6 +184,9 @@ class CreateSelfAccountView(AccessMixin, SuccessMessageMixin, FormView):
|
|||
headers={"Reply-To": "contact@dgnum.eu"},
|
||||
).send()
|
||||
|
||||
if settings.VLAN_AUTOCONNECT:
|
||||
u.register_unique_vlan()
|
||||
|
||||
return super().form_valid(form)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue