-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [#654] remove config option email_verification_enabled
The config option: ```toml [mail] email_verification_enabled = false ``` was replaced with: ```toml [registration] [registration.email] verified = true ```
- Loading branch information
1 parent
29cc9dc
commit e0dbdbe
Showing
8 changed files
with
53 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -433,7 +433,6 @@ mod tests { | |
connect_url = "sqlite://data.db?mode=rwc" | ||
[mail] | ||
email_verification_enabled = false | ||
from = "[email protected]" | ||
reply_to = "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,6 @@ use serde::{Deserialize, Serialize}; | |
/// SMTP configuration. | ||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] | ||
pub struct Mail { | ||
/// Whether or not to enable email verification on signup. | ||
#[serde(default = "Mail::default_email_verification_enabled")] | ||
pub email_verification_enabled: bool, | ||
|
||
/// The email address to send emails from. | ||
#[serde(default = "Mail::default_from")] | ||
pub from: Mailbox, | ||
|
@@ -24,7 +20,6 @@ pub struct Mail { | |
impl Default for Mail { | ||
fn default() -> Self { | ||
Self { | ||
email_verification_enabled: Self::default_email_verification_enabled(), | ||
from: Self::default_from(), | ||
reply_to: Self::default_reply_to(), | ||
smtp: Self::default_smtp(), | ||
|
@@ -33,10 +28,6 @@ impl Default for Mail { | |
} | ||
|
||
impl Mail { | ||
fn default_email_verification_enabled() -> bool { | ||
false | ||
} | ||
|
||
fn default_from() -> Mailbox { | ||
"[email protected]".parse().expect("valid mailbox") | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -191,7 +191,6 @@ | |
//! connect_url = "sqlite://data.db?mode=rwc" | ||
//! | ||
//! [mail] | ||
//! email_verification_enabled = false | ||
//! from = "[email protected]" | ||
//! reply_to = "[email protected]" | ||
//! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,43 +30,55 @@ | |
//! ```json | ||
//! { | ||
//! "data": { | ||
//! "version": "2", | ||
//! "logging": { | ||
//! "threshold": "info" | ||
//! }, | ||
//! "website": { | ||
//! "name": "Torrust" | ||
//! }, | ||
//! "tracker": { | ||
//! "url": "udp://localhost:6969", | ||
//! "mode": "public", | ||
//! "api_url": "http://localhost:1212/", | ||
//! "token": "MyAccessToken", | ||
//! "token_valid_seconds": 7257600 | ||
//! "listed": false, | ||
//! "private": false, | ||
//! "token": "***", | ||
//! "token_valid_seconds": 7257600, | ||
//! "url": "udp://localhost:6969" | ||
//! }, | ||
//! "net": { | ||
//! "port": 3001, | ||
//! "base_url": null | ||
//! "base_url": null, | ||
//! "bind_address": "0.0.0.0:3001", | ||
//! "tsl": null | ||
//! }, | ||
//! "auth": { | ||
//! "min_password_length": 6, | ||
//! "max_password_length": 64, | ||
//! "secret_key": "MaxVerstappenWC2021" | ||
//! "secret_key": "***", | ||
//! "password_constraints": { | ||
//! "max_password_length": 64, | ||
//! "min_password_length": 6 | ||
//! } | ||
//! }, | ||
//! "database": { | ||
//! "connect_url": "sqlite://./storage/database/data.db?mode=rwc" | ||
//! "connect_url": "sqlite://data.db?mode=rwc" | ||
//! }, | ||
//! "mail": { | ||
//! "email_verification_enabled": false, | ||
//! "from": "[email protected]", | ||
//! "reply_to": "[email protected]", | ||
//! "username": "", | ||
//! "password": "", | ||
//! "server": "", | ||
//! "port": 25 | ||
//! "smtp": { | ||
//! "port": 25, | ||
//! "server": "", | ||
//! "credentials": { | ||
//! "password": "***", | ||
//! "username": "" | ||
//! } | ||
//! } | ||
//! }, | ||
//! "image_cache": { | ||
//! "max_request_timeout_ms": 1000, | ||
//! "capacity": 128000000, | ||
//! "entry_size_limit": 4000000, | ||
//! "user_quota_period_seconds": 3600, | ||
//! "user_quota_bytes": 64000000 | ||
//! "max_request_timeout_ms": 1000, | ||
//! "user_quota_bytes": 64000000, | ||
//! "user_quota_period_seconds": 3600 | ||
//! }, | ||
//! "api": { | ||
//! "default_torrent_page_size": 10, | ||
|
@@ -79,8 +91,8 @@ | |
//! } | ||
//! }, | ||
//! "tracker_statistics_importer": { | ||
//! "port": 3002, | ||
//! "torrent_info_update_interval": 3600 | ||
//! "port": 3002 | ||
//! } | ||
//! } | ||
//! } | ||
|
@@ -107,7 +119,7 @@ | |
//! --header "Content-Type: application/json" \ | ||
//! --header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJfaWQiOjEsInVzZXJuYW1lIjoiaW5kZXhhZG1pbiIsImFkbWluaXN0cmF0b3IiOnRydWV9LCJleHAiOjE2ODYyMTU3ODh9.4k8ty27DiWwOk4WVcYEhIrAndhpXMRWnLZ3i_HlJnvI" \ | ||
//! --request POST \ | ||
//! --data '{"website":{"name":"Torrust"},"tracker":{"url":"udp://localhost:6969","mode":"public","api_url":"http://localhost:1212/","token":"MyAccessToken","token_valid_seconds":7257600},"net":{"port":3001,"base_url":null},"auth":{"min_password_length":6,"max_password_length":64,"secret_key":"MaxVerstappenWC2021"},"database":{"connect_url":"sqlite://./storage/database/data.db?mode=rwc"},"mail":{"email_verification_enabled":false,"from":"[email protected]","reply_to":"[email protected]","username":"","password":"","server":"","port":25},"image_cache":{"max_request_timeout_ms":1000,"capacity":128000000,"entry_size_limit":4000000,"user_quota_period_seconds":3600,"user_quota_bytes":64000000},"api":{"default_torrent_page_size":10,"max_torrent_page_size":30},"tracker_statistics_importer":{"torrent_info_update_interval":3600}}' \ | ||
//! --data '{"website":{"name":"Torrust"},"tracker":{"url":"udp://localhost:6969","mode":"public","api_url":"http://localhost:1212/","token":"MyAccessToken","token_valid_seconds":7257600},"net":{"port":3001,"base_url":null},"auth":{"min_password_length":6,"max_password_length":64,"secret_key":"MaxVerstappenWC2021"},"database":{"connect_url":"sqlite://./storage/database/data.db?mode=rwc"},"mail":{"from":"[email protected]","reply_to":"[email protected]","username":"","password":"","server":"","port":25},"image_cache":{"max_request_timeout_ms":1000,"capacity":128000000,"entry_size_limit":4000000,"user_quota_period_seconds":3600,"user_quota_bytes":64000000},"api":{"default_torrent_page_size":10,"max_torrent_page_size":30},"tracker_statistics_importer":{"torrent_info_update_interval":3600}}' \ | ||
//! "http://127.0.0.1:3001/v1/settings" | ||
//! ``` | ||
//! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters