From b0ead0ccd61c0e27dabbfbf03741df260854c2f0 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Sun, 10 Sep 2017 18:16:59 +0200 Subject: [PATCH] =?UTF-8?q?Reglage=20mac=5Fautocapture=20ajout=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0018_optionaltopologie_mac_autocapture.py | 20 +++++++++++++++++++ preferences/models.py | 2 ++ .../preferences/display_preferences.html | 4 ++++ 3 files changed, 26 insertions(+) create mode 100644 preferences/migrations/0018_optionaltopologie_mac_autocapture.py diff --git a/preferences/migrations/0018_optionaltopologie_mac_autocapture.py b/preferences/migrations/0018_optionaltopologie_mac_autocapture.py new file mode 100644 index 00000000..386da143 --- /dev/null +++ b/preferences/migrations/0018_optionaltopologie_mac_autocapture.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-09-10 16:16 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('preferences', '0017_mailmessageoption'), + ] + + operations = [ + migrations.AddField( + model_name='optionaltopologie', + name='mac_autocapture', + field=models.BooleanField(default=False), + ), + ] diff --git a/preferences/models.py b/preferences/models.py index 2778ed99..b2843310 100644 --- a/preferences/models.py +++ b/preferences/models.py @@ -54,9 +54,11 @@ class OptionalTopologie(models.Model): (DEFINED, 'Prédéfini dans "Vlan où placer les machines après acceptation RADIUS"'), ) + radius_general_policy = models.CharField(max_length=32, choices=CHOICE_RADIUS, default='DEFINED') vlan_decision_ok = models.OneToOneField('machines.Vlan', on_delete=models.PROTECT, related_name='decision_ok', blank=True, null=True) vlan_decision_nok = models.OneToOneField('machines.Vlan', on_delete=models.PROTECT, related_name='decision_nok', blank=True, null=True) + mac_autocapture = models.BooleanField(default=False) class GeneralOption(models.Model): PRETTY_NAME = "Options générales" diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html index d96f4ed7..17ece295 100644 --- a/preferences/templates/preferences/display_preferences.html +++ b/preferences/templates/preferences/display_preferences.html @@ -96,6 +96,10 @@ with this program; if not, write to the Free Software Foundation, Inc., Vlan où placer les machines après rejet RADIUS {{ topologieoptions.vlan_decision_nok }} + + Autocapture des macs à la connexion + {{ topologieoptions.mac_autocapture }} +

Préférences generales

{% if is_bureau %}