fix: adjust domain accessors and template adapter for Askama compatibility
This commit is contained in:
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user