in preparation to moving userdata into app, we switched to arbitrary groups

This commit is contained in:
2023-12-23 21:27:52 +01:00
parent 54c013ec10
commit 9fb4167b50
29 changed files with 396 additions and 256 deletions

View File

@ -13,7 +13,7 @@ use crate::{
model::{
boat::Boat,
boatdamage::{BoatDamage, BoatDamageFixed, BoatDamageToAdd, BoatDamageVerified},
user::{CoxUser, NonGuestUser, TechUser, User},
user::{CoxUser, NonGuestUser, TechUser, User, UserWithRoles},
},
tera::log::KioskCookie,
};
@ -57,7 +57,10 @@ async fn index(
context.insert("boatdamages", &boatdamages);
context.insert("boats", &boats);
context.insert("loggedin_user", &user.user);
context.insert(
"loggedin_user",
&UserWithRoles::from_user(user.user, db).await,
);
Template::render("boatdamages", context.into_json())
}