1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-12-27 22:18:51 +00:00

Make data conservation policy updates password-protected

This commit is contained in:
Pierre HUBERT 2021-02-15 19:32:08 +01:00
parent aa8916b8f2
commit 2e912b7e1c

View File

@ -215,6 +215,8 @@ pub fn get_data_conservation_policy(r: &mut HttpRequestHandler) -> RequestResult
/// Set data conservation policy
pub fn set_data_conservation_policy(r: &mut HttpRequestHandler) -> RequestResult {
r.need_user_password("password")?;
let policy = NewDataConservationPolicy {
user_id: r.user_id()?,
delete_account_after: r.post_positive_u64_opt("inactive_account_lifetime")?,