@@ -13,6 +13,7 @@ use minijinja::{
13
13
14
14
/// Site features information.
15
15
#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
16
+ #[ allow( clippy:: struct_excessive_bools) ]
16
17
pub struct SiteFeatures {
17
18
/// Whether local password-based registration is enabled.
18
19
pub password_registration : bool ,
@@ -22,6 +23,9 @@ pub struct SiteFeatures {
22
23
23
24
/// Whether email-based account recovery is enabled.
24
25
pub account_recovery : bool ,
26
+
27
+ /// Whether passkeys are enabled
28
+ pub passkeys_enabled : bool ,
25
29
}
26
30
27
31
impl Object for SiteFeatures {
@@ -30,6 +34,7 @@ impl Object for SiteFeatures {
30
34
"password_registration" => Some ( Value :: from ( self . password_registration ) ) ,
31
35
"password_login" => Some ( Value :: from ( self . password_login ) ) ,
32
36
"account_recovery" => Some ( Value :: from ( self . account_recovery ) ) ,
37
+ "passkeys_enabled" => Some ( Value :: from ( self . passkeys_enabled ) ) ,
33
38
_ => None ,
34
39
}
35
40
}
@@ -39,6 +44,7 @@ impl Object for SiteFeatures {
39
44
"password_registration" ,
40
45
"password_login" ,
41
46
"account_recovery" ,
47
+ "passkeys_enabled" ,
42
48
] )
43
49
}
44
50
}
0 commit comments