From e9451dd163d6865fdeb6a47fb62e489b1179e3bd Mon Sep 17 00:00:00 2001
From: thomaswoehlke <thomas.woehlke@gmail.com>
Date: Sat, 17 Apr 2021 14:14:51 +0200
Subject: [PATCH] work

---
 .../admin/navigation/admin_navbar_dropdown.html      |  6 +++++-
 .../templates/admin/navigation/admin_navtabs.html    |  2 ++
 .../ecdc/templates/ecdc/navigation/ecdc_navtabs.html |  4 ++++
 .../owid/navigation/owid_navbar_dropdown.html        | 12 +++++++-----
 .../owid/templates/owid/navigation/owid_navtabs.html |  4 ++++
 .../usr/navigation/usr_navbar_dropdown.html          |  2 ++
 .../user/templates/usr/navigation/usr_navtabs.html   |  2 ++
 .../who/navigation/who_navbar_dropdown.html          |  4 ++++
 .../who/templates/who/navigation/who_navtabs.html    |  4 ++++
 9 files changed, 34 insertions(+), 6 deletions(-)

diff --git a/src/covid19/blueprints/admin/templates/admin/navigation/admin_navbar_dropdown.html b/src/covid19/blueprints/admin/templates/admin/navigation/admin_navbar_dropdown.html
index 15be18b6..462c14df 100644
--- a/src/covid19/blueprints/admin/templates/admin/navigation/admin_navbar_dropdown.html
+++ b/src/covid19/blueprints/admin/templates/admin/navigation/admin_navbar_dropdown.html
@@ -4,18 +4,20 @@
                     </a>
                     <ul class="dropdown-menu">
                         <li>
-                            <a class="dropdown-item" href="{{ url_for( 'app_admin.url_admin_tasks') }}">
+                            <a class="dropdown-item" href="{{ url_for( 'app_admin.url_admin_info') }}">
                                 Admin
                             </a>
                         </li>
                         <li>
                             <div class="dropdown-divider"></div>
                         </li>
+                        {% if current_user.is_authenticated %}
                         <li>
                             <a class="dropdown-item" href="{{ url_for( 'app_admin.url_admin_tasks') }}">
                                 admin tasks
                             </a>
                         </li>
+                        {% endif %}
                         <li>
                             <a class="dropdown-item" href="{{ url_for( 'app_admin.url_admin_info') }}">
                                 admin info
@@ -26,6 +28,7 @@
                                 flask admin
                             </a>
                         </li>
+                        {% if current_user.is_authenticated %}
                         <li>
                             <div class="dropdown-divider"></div>
                         </li>
@@ -57,5 +60,6 @@
                                 Task: Admin :: database :: dump :: reimport
                             </a>
                         </li>
+                        {% endif %}
                     </ul>
                 </li>
\ No newline at end of file
diff --git a/src/covid19/blueprints/admin/templates/admin/navigation/admin_navtabs.html b/src/covid19/blueprints/admin/templates/admin/navigation/admin_navtabs.html
index 4ddf5d8c..4c58bf5f 100644
--- a/src/covid19/blueprints/admin/templates/admin/navigation/admin_navtabs.html
+++ b/src/covid19/blueprints/admin/templates/admin/navigation/admin_navtabs.html
@@ -8,10 +8,12 @@
                             <a class="nav-link"
                                href="{{ url_for( 'app_admin.url_admin_info') }}">admin Info</a>
                         </li>
+                        {% if current_user.is_authenticated %}
                         <li class="nav-item">
                             <a class="nav-link"
                                href="{{ url_for( 'app_admin.url_admin_tasks') }}">admin tasks</a>
                         </li>
+                        {% endif %}
                         <li class="nav-item">
                             <a class="nav-link"
                                href="{{ url_for( 'app_admin.url_admin_index') }}">flask admin</a>
diff --git a/src/covid19/blueprints/ecdc/templates/ecdc/navigation/ecdc_navtabs.html b/src/covid19/blueprints/ecdc/templates/ecdc/navigation/ecdc_navtabs.html
index 388e9ca7..20f4f779 100644
--- a/src/covid19/blueprints/ecdc/templates/ecdc/navigation/ecdc_navtabs.html
+++ b/src/covid19/blueprints/ecdc/templates/ecdc/navigation/ecdc_navtabs.html
@@ -6,10 +6,12 @@
                         <a class="nav-link"
                            href="{{ url_for( 'ecdc.url_ecdc_info') }}">ECDC Info</a>
                     </li>
+                    {% if current_user.is_authenticated %}
                     <li class="nav-item">
                         <a class="nav-link"
                            href="{{ url_for( 'ecdc.url_ecdc_tasks') }}">ECDC tasks</a>
                     </li>
+                    {% endif %}
                     <li class="nav-item">
                         <a class="nav-link"
                            href="{{ url_for( 'ecdc.url_ecdc_date_reported_all') }}">
@@ -28,10 +30,12 @@
                         <a class="nav-link"
                            href="{{ url_for( 'ecdc.url_ecdc_country_all') }}">ECDC country</a>
                     </li>
+                    {% if current_user.is_authenticated %}
                     <li class="nav-item">
                         <a class="nav-link"
                            href="{{ url_for( 'ecdc.url_ecdc_data_imported') }}">ECDC imported</a>
                     </li>
+                    {% endif %}
                 </ul>
             </nav>
         </div>
diff --git a/src/covid19/blueprints/owid/templates/owid/navigation/owid_navbar_dropdown.html b/src/covid19/blueprints/owid/templates/owid/navigation/owid_navbar_dropdown.html
index ab804bf7..c3c285bf 100644
--- a/src/covid19/blueprints/owid/templates/owid/navigation/owid_navbar_dropdown.html
+++ b/src/covid19/blueprints/owid/templates/owid/navigation/owid_navbar_dropdown.html
@@ -11,11 +11,6 @@
                         <li>
                             <div class="dropdown-divider"></div>
                         </li>
-                        <li>
-                            <a class="dropdown-item" href="{{ url_for( 'owid.url_owid_imported') }}">
-                                OWID imported
-                            </a>
-                        </li>
                         <li>
                             <div class="dropdown-divider"></div>
                         </li>
@@ -24,10 +19,17 @@
                                 OWID Info
                             </a>
                         </li>
+                        {% if current_user.is_authenticated %}
                         <li>
                             <a class="dropdown-item" href="{{ url_for( 'owid.url_owid_tasks') }}">
                                 OWID Tasks
                             </a>
                         </li>
+                        <li>
+                            <a class="dropdown-item" href="{{ url_for( 'owid.url_owid_imported') }}">
+                                OWID imported
+                            </a>
+                        </li>
+                        {% endif %}
                     </ul>
                 </li>
\ No newline at end of file
diff --git a/src/covid19/blueprints/owid/templates/owid/navigation/owid_navtabs.html b/src/covid19/blueprints/owid/templates/owid/navigation/owid_navtabs.html
index 9f01db3a..00cf32bb 100644
--- a/src/covid19/blueprints/owid/templates/owid/navigation/owid_navtabs.html
+++ b/src/covid19/blueprints/owid/templates/owid/navigation/owid_navtabs.html
@@ -8,10 +8,12 @@
                         <a class="nav-link"
                            href="{{ url_for( 'owid.url_owid_info') }}">OWID Info</a>
                     </li>
+                    {% if current_user.is_authenticated %}
                     <li class="nav-item">
                         <a class="nav-link"
                            href="{{ url_for( 'owid.url_owid_tasks') }}">OWID tasks</a>
                     </li>
+                    {% endif %}
                     <li class="nav-item">
                         <a class="nav-link"
                            href="{{ url_for( 'owid.url_owid_date_reported_all') }}">OWID Date Reported</a>
@@ -28,10 +30,12 @@
                         <a class="nav-link"
                            href="{{ url_for( 'owid.url_owid_country_one_germany') }}">OWID Germany</a>
                     </li>
+                    {% if current_user.is_authenticated %}
                     <li class="nav-item">
                         <a class="nav-link"
                            href="{{ url_for( 'owid.url_owid_imported') }}">OWID imported</a>
                     </li>
+                    {% endif %}
                 </ul>
             </nav>
         </div>
diff --git a/src/covid19/blueprints/user/templates/usr/navigation/usr_navbar_dropdown.html b/src/covid19/blueprints/user/templates/usr/navigation/usr_navbar_dropdown.html
index d56d46f9..adeaf6dd 100644
--- a/src/covid19/blueprints/user/templates/usr/navigation/usr_navbar_dropdown.html
+++ b/src/covid19/blueprints/user/templates/usr/navigation/usr_navbar_dropdown.html
@@ -18,11 +18,13 @@
                                 User Info
                             </a>
                         </li>
+                        {% if current_user.is_authenticated %}
                         <li>
                             <a class="dropdown-item"
                                href="{{ url_for( 'usr.url_user_tasks') }}">
                                 User Tasks
                             </a>
                         </li>
+                        {% endif %}
                     </ul>
                 </li>
\ No newline at end of file
diff --git a/src/covid19/blueprints/user/templates/usr/navigation/usr_navtabs.html b/src/covid19/blueprints/user/templates/usr/navigation/usr_navtabs.html
index 7f0f4cb9..6684d40f 100644
--- a/src/covid19/blueprints/user/templates/usr/navigation/usr_navtabs.html
+++ b/src/covid19/blueprints/user/templates/usr/navigation/usr_navtabs.html
@@ -8,10 +8,12 @@
                         <a class="nav-link"
                            href="{{ url_for( 'usr.url_user_info') }}">User Info</a>
                     </li>
+                    {% if current_user.is_authenticated %}
                     <li class="nav-item">
                         <a class="nav-link"
                            href="{{ url_for( 'usr.url_user_tasks') }}">User tasks</a>
                     </li>
+                    {% endif %}
                 </ul>
             </nav>
         </div>
diff --git a/src/covid19/blueprints/who/templates/who/navigation/who_navbar_dropdown.html b/src/covid19/blueprints/who/templates/who/navigation/who_navbar_dropdown.html
index 9d653f96..2c2e5a9d 100644
--- a/src/covid19/blueprints/who/templates/who/navigation/who_navbar_dropdown.html
+++ b/src/covid19/blueprints/who/templates/who/navigation/who_navbar_dropdown.html
@@ -37,11 +37,13 @@
                         <li>
                             <div class="dropdown-divider"></div>
                         </li>
+                        {% if current_user.is_authenticated %}
                         <li>
                             <a class="dropdown-item" href="{{ url_for( 'who.url_who_imported') }}">
                                 WHO imported
                             </a>
                         </li>
+                        {% endif %}
                         <li>
                             <div class="dropdown-divider"></div>
                         </li>
@@ -50,10 +52,12 @@
                                 WHO Info
                             </a>
                         </li>
+                        {% if current_user.is_authenticated %}
                         <li>
                             <a class="dropdown-item" href="{{ url_for( 'who.url_who_tasks') }}">
                                 WHO Tasks
                             </a>
                         </li>
+                        {% endif %}
                     </ul>
                 </li>
\ No newline at end of file
diff --git a/src/covid19/blueprints/who/templates/who/navigation/who_navtabs.html b/src/covid19/blueprints/who/templates/who/navigation/who_navtabs.html
index af699352..d0392ab5 100644
--- a/src/covid19/blueprints/who/templates/who/navigation/who_navtabs.html
+++ b/src/covid19/blueprints/who/templates/who/navigation/who_navtabs.html
@@ -8,10 +8,12 @@
                         <a class="nav-link"
                            href="{{ url_for( 'who.url_who_info') }}">WHO Info</a>
                     </li>
+                    {% if current_user.is_authenticated %}
                     <li class="nav-item">
                         <a class="nav-link"
                            href="{{ url_for( 'who.url_who_tasks') }}">WHO tasks</a>
                     </li>
+                    {% endif %}
                     <li class="nav-item">
                         <a class="nav-link"
                            href="{{ url_for( 'who.url_who_date_reported_all') }}">WHO Date Reported</a>
@@ -28,10 +30,12 @@
                         <a class="nav-link"
                            href="{{ url_for( 'who.url_who_country_all') }}">WHO Countries</a>
                     </li>
+                    {% if current_user.is_authenticated %}
                     <li class="nav-item">
                         <a class="nav-link"
                            href="{{ url_for( 'who.url_who_imported') }}">WHO imported</a>
                     </li>
+                    {% endif %}
                 </ul>
             </nav>
         </div>
-- 
GitLab