1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-26 07:19:22 +00:00

Add privacy policy URL in static configuration

This commit is contained in:
Pierre HUBERT 2021-02-20 11:21:45 +01:00
parent 1ad4e344f6
commit 1349bfc471
3 changed files with 9 additions and 4 deletions

View File

@ -22,6 +22,7 @@ storage-path: /home/pierre/Documents/projets_web/comunic/current/user_data/
# URL where Comunic Terms of use are available # URL where Comunic Terms of use are available
terms-url: http://devweb.local/comunic/current/about.php?cgu terms-url: http://devweb.local/comunic/current/about.php?cgu
privacy-policy-url: http://devweb.local/comunic/current/about.php?cgu&privacy
# Android application download URL # Android application download URL
play-store-url: https://play.google.com/store/apps/details?id=org.communiquons.comunic play-store-url: https://play.google.com/store/apps/details?id=org.communiquons.comunic

View File

@ -31,8 +31,9 @@ struct DataConservationPolicy {
#[derive(Serialize)] #[derive(Serialize)]
pub struct ServerConfig { pub struct ServerConfig {
min_supported_mobile_version: &'static str, min_supported_mobile_version: &'static str,
terms_url: String, terms_url: &'static str,
play_store_url: String, privacy_policy_url: &'static str,
play_store_url: &'static str,
android_direct_download_url: String, android_direct_download_url: String,
password_policy: PasswordPolicy, password_policy: PasswordPolicy,
data_conservation_policy: DataConservationPolicy, data_conservation_policy: DataConservationPolicy,
@ -42,8 +43,9 @@ impl ServerConfig {
pub fn new() -> Self { pub fn new() -> Self {
ServerConfig { ServerConfig {
min_supported_mobile_version: MIN_SUPPORTED_MOBILE_VERSION, min_supported_mobile_version: MIN_SUPPORTED_MOBILE_VERSION,
terms_url: conf().terms_url.clone(), terms_url: &conf().terms_url,
play_store_url: conf().play_store_url.clone(), privacy_policy_url: &conf().privacy_policy_url,
play_store_url: &conf().play_store_url,
android_direct_download_url: conf().android_direct_download_url.clone(), android_direct_download_url: conf().android_direct_download_url.clone(),
password_policy: PasswordPolicy { password_policy: PasswordPolicy {
allow_email_in_password: password_policy::ALLOW_EMAIL_IN_PASSWORD, allow_email_in_password: password_policy::ALLOW_EMAIL_IN_PASSWORD,

View File

@ -31,6 +31,7 @@ pub struct Config {
pub storage_url: String, pub storage_url: String,
pub storage_path: String, pub storage_path: String,
pub terms_url: String, pub terms_url: String,
pub privacy_policy_url: String,
pub play_store_url: String, pub play_store_url: String,
pub android_direct_download_url: String, pub android_direct_download_url: String,
pub proxy: Option<String>, pub proxy: Option<String>,
@ -105,6 +106,7 @@ impl Config {
storage_path: Config::yaml_str(parsed, "storage-path"), storage_path: Config::yaml_str(parsed, "storage-path"),
terms_url: Config::yaml_str(parsed, "terms-url"), terms_url: Config::yaml_str(parsed, "terms-url"),
privacy_policy_url: Config::yaml_str(parsed, "privacy-policy-url"),
play_store_url: Config::yaml_str(parsed, "play-store-url"), play_store_url: Config::yaml_str(parsed, "play-store-url"),
android_direct_download_url: Config::yaml_str(parsed, "android-direct-download-url"), android_direct_download_url: Config::yaml_str(parsed, "android-direct-download-url"),