* [pbs-devel] [PATCH backup] tfa: remove/empty description for recovery keys
@ 2021-01-18 14:11 Wolfgang Bumiller
2021-01-18 15:00 ` [pbs-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Wolfgang Bumiller @ 2021-01-18 14:11 UTC (permalink / raw)
To: pbs-devel
While the user chosen description is not allowed to be
empty, we do leave it empty for recovery keys, as a "dummy
description" makes little sense...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
src/config/tfa.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/config/tfa.rs b/src/config/tfa.rs
index aff1b3d8..f957cd75 100644
--- a/src/config/tfa.rs
+++ b/src/config/tfa.rs
@@ -343,6 +343,7 @@ pub struct TfaInfo {
pub id: String,
/// User chosen description for this entry.
+ #[serde(skip_serializing_if = "String::is_empty")]
pub description: String,
/// Creation time of this entry as unix epoch.
@@ -359,7 +360,7 @@ impl TfaInfo {
pub(crate) fn recovery(created: i64) -> Self {
Self {
id: "recovery".to_string(),
- description: "recovery keys".to_string(),
+ description: String::new(),
enable: true,
created,
}
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pbs-devel] applied: [PATCH backup] tfa: remove/empty description for recovery keys
2021-01-18 14:11 [pbs-devel] [PATCH backup] tfa: remove/empty description for recovery keys Wolfgang Bumiller
@ 2021-01-18 15:00 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-01-18 15:00 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Wolfgang Bumiller
On 18.01.21 15:11, Wolfgang Bumiller wrote:
> While the user chosen description is not allowed to be
> empty, we do leave it empty for recovery keys, as a "dummy
> description" makes little sense...
>
> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
> ---
> src/config/tfa.rs | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-18 15:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 14:11 [pbs-devel] [PATCH backup] tfa: remove/empty description for recovery keys Wolfgang Bumiller
2021-01-18 15:00 ` [pbs-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox