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

@ -4,7 +4,7 @@ use sqlx::SqlitePool;
use crate::model::{
stat::{self, Stat},
user::NonGuestUser,
user::{NonGuestUser, UserWithRoles},
};
use super::log::KioskCookie;
@ -16,7 +16,7 @@ async fn index_boat(db: &State<SqlitePool>, user: NonGuestUser, year: Option<i32
Template::render(
"stat.boats",
context!(loggedin_user: &user.user, stat, kiosk),
context!(loggedin_user: &UserWithRoles::from_user(user.user, db).await, stat, kiosk),
)
}
@ -41,7 +41,7 @@ async fn index(db: &State<SqlitePool>, user: NonGuestUser, year: Option<i32>) ->
Template::render(
"stat.people",
context!(loggedin_user: &user.user, stat, personal, kiosk, guest_km),
context!(loggedin_user: &UserWithRoles::from_user(user.user, db).await, stat, personal, kiosk, guest_km),
)
}