From c4e3888e7eecf2e7b53e2502e6634ff8fae9e5f4 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sat, 30 Dec 2017 02:00:32 +0100 Subject: [PATCH] =?UTF-8?q?Acl=20sur=20la=20cr=C3=A9ation=20de=20switch.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- topologie/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/topologie/views.py b/topologie/views.py index 84ee9fb7..25cc8aa2 100644 --- a/topologie/views.py +++ b/topologie/views.py @@ -354,10 +354,13 @@ def new_switch(request): associée. Vue complexe. Appelle successivement les 4 models forms adaptés : machine, interface, domain et switch""" switch = NewSwitchForm(request.POST or None) - machine = NewMachineForm(request.POST or None) + machine = NewMachineForm( + request.POST or None, + user=request.user + ) interface = AddInterfaceForm( request.POST or None, - infra=request.user.has_perms(('infra',)) + user=request.user ) domain = DomainForm( request.POST or None,