@@ -22,6 +22,9 @@ pub struct SiteConfig {
22
22
/// Whether password registration is enabled.
23
23
pub password_registration_enabled : bool ,
24
24
25
+ /// Whether a valid email address is required for password registrations.
26
+ pub password_registration_email_required : bool ,
27
+
25
28
/// Whether registration tokens are required for password registrations.
26
29
pub registration_token_required : bool ,
27
30
@@ -59,6 +62,7 @@ pub fn doc(operation: TransformOperation) -> TransformOperation {
59
62
server_name : "example.com" . to_owned ( ) ,
60
63
password_login_enabled : true ,
61
64
password_registration_enabled : true ,
65
+ password_registration_email_required : true ,
62
66
registration_token_required : true ,
63
67
email_change_allowed : true ,
64
68
displayname_change_allowed : true ,
@@ -80,6 +84,7 @@ pub async fn handler(
80
84
server_name : site_config. server_name ,
81
85
password_login_enabled : site_config. password_login_enabled ,
82
86
password_registration_enabled : site_config. password_registration_enabled ,
87
+ password_registration_email_required : site_config. password_registration_email_required ,
83
88
registration_token_required : site_config. registration_token_required ,
84
89
email_change_allowed : site_config. email_change_allowed ,
85
90
displayname_change_allowed : site_config. displayname_change_allowed ,
0 commit comments