From a5836a35b68456ab87c4e4982130ff9cb9821dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 21 Jun 2019 10:28:34 +0200 Subject: [PATCH] misc: remove link to FranceConnect screen if there's no authentic (#34209) --- hobo/templates/hobo/home.html | 2 ++ hobo/views.py | 1 + 2 files changed, 3 insertions(+) diff --git a/hobo/templates/hobo/home.html b/hobo/templates/hobo/home.html index 14b6e46..3f45c83 100644 --- a/hobo/templates/hobo/home.html +++ b/hobo/templates/hobo/home.html @@ -9,7 +9,9 @@
  • {% trans 'User Profile' %}
  • {% trans 'Theme' %}
  • {% trans 'Emails' %}
  • + {% if has_authentic %}
  • FranceConnect
  • + {% endif %}
  • {% trans 'User tracking' %}
  • {% trans 'Services' %}
  • {% trans 'Variables' %}
  • diff --git a/hobo/views.py b/hobo/views.py index 537f606..87922a2 100644 --- a/hobo/views.py +++ b/hobo/views.py @@ -33,6 +33,7 @@ class Home(TemplateView): def get_context_data(self, **kwargs): context = super(Home, self).get_context_data(**kwargs) context['services'] = [x for x in get_installed_services() if not x.secondary] + context['has_authentic'] = bool(Authentic.objects.filter(secondary=False)) return context home = admin_required(Home.as_view())