From b3d7715c547276ce044b3db02a38e620ab1250f2 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sat, 20 Jan 2018 01:01:39 +0100 Subject: [PATCH 1/4] Fix Service usage in machine templates. --- machines/templates/machines/sidebar.html | 4 ++-- re2o/templatetags/acl.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/machines/templates/machines/sidebar.html b/machines/templates/machines/sidebar.html index 355d5147..31ccdbe2 100644 --- a/machines/templates/machines/sidebar.html +++ b/machines/templates/machines/sidebar.html @@ -62,7 +62,7 @@ with this program; if not, write to the Free Software Foundation, Inc., Gestion des nas {% acl_end %} - {% can_view_all Service %} + {% can_view_all machines.Service %} Services (dhcp, dns...) @@ -72,6 +72,6 @@ with this program; if not, write to the Free Software Foundation, Inc., Ouverture de ports - + {% acl_end %} {% endblock %} diff --git a/re2o/templatetags/acl.py b/re2o/templatetags/acl.py index 79bdbc5f..3d99237b 100644 --- a/re2o/templatetags/acl.py +++ b/re2o/templatetags/acl.py @@ -106,7 +106,7 @@ MODEL_NAME = { 'Interface' : machines.models.Interface, 'Domain' : machines.models.Domain, 'IpList' : machines.models.IpList, - 'Service' : machines.models.Service, + 'machines.Service' : machines.models.Service, 'Service_link' : machines.models.Service_link, 'OuverturePortList' : machines.models.OuverturePortList, 'OuverturePort' : machines.models.OuverturePort, @@ -115,7 +115,7 @@ MODEL_NAME = { 'OptionalMachine': preferences.models.OptionalMachine, 'OptionalTopologie': preferences.models.OptionalTopologie, 'GeneralOption': preferences.models.GeneralOption, - 'Service': preferences.models.Service, + 'preferences.Service': preferences.models.Service, 'AssoOption': preferences.models.AssoOption, 'MailMessageOption': preferences.models.MailMessageOption, # topologie From 12ab3abb01a6d7fc63baa50a6b17a07cd71a539c Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sat, 20 Jan 2018 01:01:39 +0100 Subject: [PATCH 2/4] Fix Service usage in machine templates. --- machines/templates/machines/index_service.html | 2 +- machines/templates/machines/sidebar.html | 4 ++-- preferences/templates/preferences/display_preferences.html | 2 +- re2o/templatetags/acl.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/machines/templates/machines/index_service.html b/machines/templates/machines/index_service.html index 4a06761d..b21c4921 100644 --- a/machines/templates/machines/index_service.html +++ b/machines/templates/machines/index_service.html @@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% block content %}

Liste des services

- {% can_create Service %} + {% can_create machines.Service %} Ajouter un service {% acl_end %} Supprimer un ou plusieurs service diff --git a/machines/templates/machines/sidebar.html b/machines/templates/machines/sidebar.html index 355d5147..31ccdbe2 100644 --- a/machines/templates/machines/sidebar.html +++ b/machines/templates/machines/sidebar.html @@ -62,7 +62,7 @@ with this program; if not, write to the Free Software Foundation, Inc., Gestion des nas {% acl_end %} - {% can_view_all Service %} + {% can_view_all machines.Service %} Services (dhcp, dns...) @@ -72,6 +72,6 @@ with this program; if not, write to the Free Software Foundation, Inc., Ouverture de ports - + {% acl_end %} {% endblock %} diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html index 2b1caec8..7802929d 100644 --- a/preferences/templates/preferences/display_preferences.html +++ b/preferences/templates/preferences/display_preferences.html @@ -179,7 +179,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,

Liste des services page d'accueil

- {% can_create Service%} + {% can_create preferences.Service%} Ajouter un service {% acl_end %} Supprimer un ou plusieurs service diff --git a/re2o/templatetags/acl.py b/re2o/templatetags/acl.py index 79bdbc5f..3d99237b 100644 --- a/re2o/templatetags/acl.py +++ b/re2o/templatetags/acl.py @@ -106,7 +106,7 @@ MODEL_NAME = { 'Interface' : machines.models.Interface, 'Domain' : machines.models.Domain, 'IpList' : machines.models.IpList, - 'Service' : machines.models.Service, + 'machines.Service' : machines.models.Service, 'Service_link' : machines.models.Service_link, 'OuverturePortList' : machines.models.OuverturePortList, 'OuverturePort' : machines.models.OuverturePort, @@ -115,7 +115,7 @@ MODEL_NAME = { 'OptionalMachine': preferences.models.OptionalMachine, 'OptionalTopologie': preferences.models.OptionalTopologie, 'GeneralOption': preferences.models.GeneralOption, - 'Service': preferences.models.Service, + 'preferences.Service': preferences.models.Service, 'AssoOption': preferences.models.AssoOption, 'MailMessageOption': preferences.models.MailMessageOption, # topologie From e2b4269c6b35c6de7e3e78b0b3051acd20569115 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sat, 20 Jan 2018 01:01:39 +0100 Subject: [PATCH 3/4] Fix Service usage in machine templates. --- machines/templates/machines/sidebar.html | 4 ++-- re2o/templatetags/acl.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/machines/templates/machines/sidebar.html b/machines/templates/machines/sidebar.html index 355d5147..31ccdbe2 100644 --- a/machines/templates/machines/sidebar.html +++ b/machines/templates/machines/sidebar.html @@ -62,7 +62,7 @@ with this program; if not, write to the Free Software Foundation, Inc., Gestion des nas {% acl_end %} - {% can_view_all Service %} + {% can_view_all machines.Service %} Services (dhcp, dns...) @@ -72,6 +72,6 @@ with this program; if not, write to the Free Software Foundation, Inc., Ouverture de ports - + {% acl_end %} {% endblock %} diff --git a/re2o/templatetags/acl.py b/re2o/templatetags/acl.py index 810a6378..a73d9278 100644 --- a/re2o/templatetags/acl.py +++ b/re2o/templatetags/acl.py @@ -106,7 +106,7 @@ MODEL_NAME = { 'Interface' : machines.models.Interface, 'Domain' : machines.models.Domain, 'IpList' : machines.models.IpList, - 'Service' : machines.models.Service, + 'machines.Service' : machines.models.Service, 'Service_link' : machines.models.Service_link, 'OuverturePortList' : machines.models.OuverturePortList, 'OuverturePort' : machines.models.OuverturePort, @@ -115,7 +115,7 @@ MODEL_NAME = { 'OptionalMachine': preferences.models.OptionalMachine, 'OptionalTopologie': preferences.models.OptionalTopologie, 'GeneralOption': preferences.models.GeneralOption, - 'Service': preferences.models.Service, + 'preferences.Service': preferences.models.Service, 'AssoOption': preferences.models.AssoOption, 'MailMessageOption': preferences.models.MailMessageOption, # topologie From 3459b520e94efc757fb3cead4cd73774c0f6ffda Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sat, 20 Jan 2018 01:01:39 +0100 Subject: [PATCH 4/4] Fix Service usage in machine templates. --- machines/templates/machines/index_service.html | 2 +- preferences/templates/preferences/display_preferences.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/machines/templates/machines/index_service.html b/machines/templates/machines/index_service.html index 4a06761d..b21c4921 100644 --- a/machines/templates/machines/index_service.html +++ b/machines/templates/machines/index_service.html @@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% block content %}

Liste des services

- {% can_create Service %} + {% can_create machines.Service %} Ajouter un service {% acl_end %} Supprimer un ou plusieurs service diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html index 2b1caec8..7802929d 100644 --- a/preferences/templates/preferences/display_preferences.html +++ b/preferences/templates/preferences/display_preferences.html @@ -179,7 +179,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,

Liste des services page d'accueil

- {% can_create Service%} + {% can_create preferences.Service%} Ajouter un service {% acl_end %} Supprimer un ou plusieurs service