fix: adjust domain accessors and template adapter for Askama compatibility

This commit is contained in:
2026-05-04 19:03:48 +02:00
parent 965fc0eda8
commit 27be840faa
4 changed files with 26 additions and 2 deletions

View File

@@ -8,6 +8,12 @@ pub struct HtmlPageContext {
pub register_enabled: bool,
}
impl HtmlPageContext {
pub fn is_current_user(&self, id: Uuid) -> bool {
self.user_id == Some(id)
}
}
pub struct LoginPageData<'a> {
pub ctx: HtmlPageContext,
pub error: Option<&'a str>,