From e925fadbb8d0656419e3e9757036d27f2e895000 Mon Sep 17 00:00:00 2001 From: philipp Date: Mon, 1 Jan 2024 18:54:44 +0100 Subject: [PATCH] fix boat damage show --- Cargo.lock | 11 +++++++++++ templates/boatdamages.html.tera | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e7cb55f..d35d07d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1604,6 +1604,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "300.1.6+3.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439fac53e092cd7442a3660c85dde4643ab3b5bd39040912388dcdabf6b88085" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.98" @@ -1612,6 +1621,7 @@ checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] @@ -2130,6 +2140,7 @@ dependencies = [ "ics", "lettre", "log", + "openssl", "rocket", "rocket_dyn_templates", "serde", diff --git a/templates/boatdamages.html.tera b/templates/boatdamages.html.tera index 391f166..cdfcff1 100644 --- a/templates/boatdamages.html.tera +++ b/templates/boatdamages.html.tera @@ -57,10 +57,10 @@ {% if boatdamage.fixed_at %} Repariert von {{ boatdamage.user_fixed.name }} am/um {{ boatdamage.fixed_at | date(format='%d.%m.%Y (%H:%M)') }} {% else %} - {% if "cox" in loggedin_user.roles %} + {% if loggedin_user and "cox" in loggedin_user.roles %}
- {% if "tech" in loggedin_user.roles %} + {% if loggedin_user and "tech" in loggedin_user.roles %} {% else %} @@ -72,7 +72,7 @@ {% if boatdamage.verified_at %} Verifziert von {{ boatdamage.user_verified.name }} am/um {{ boatdamage.verified_at | date(format='%d.%m.%Y (%H:%M)') }} {% else %} - {% if "tech" in loggedin_user.roles and boatdamage.fixed_at %} + {% if loggedin_user and "tech" in loggedin_user.roles and boatdamage.fixed_at %} -- 2.45.2