From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH backup] tfa: remove/empty description for recovery keys
Date: Mon, 18 Jan 2021 15:11:16 +0100 [thread overview]
Message-ID: <20210118141116.29902-1-w.bumiller@proxmox.com> (raw)
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
next reply other threads:[~2021-01-18 14:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-18 14:11 Wolfgang Bumiller [this message]
2021-01-18 15:00 ` [pbs-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210118141116.29902-1-w.bumiller@proxmox.com \
--to=w.bumiller@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox