[pve-devel] applied: [PATCH manager 1/4] www: parser: add parseTfaType helper
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue Apr 16 10:08:32 CEST 2019
On 4/11/19 11:31 AM, Wolfgang Bumiller wrote:
> The tfa keys can now contain the type as additional
> information, so let's parse it out.
>
> Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
> ---
> www/manager6/Parser.js | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/www/manager6/Parser.js b/www/manager6/Parser.js
> index d802b12e..7aea5c73 100644
> --- a/www/manager6/Parser.js
> +++ b/www/manager6/Parser.js
> @@ -561,6 +561,19 @@ Ext.define('PVE.Parser', { statics: {
> return res;
> },
>
> + parseTfaType: function(value) {
> + var match;
> + if (!value || !value.length) {
> + return undefined;
> + } else if (value === 'x!oath') {
> + return 'totp';
> + } else if (match = value.match(/^x!(.+)$/)) {
> + return match[1];
> + } else {
> + return 1;
> + }
> + },
> +
> parseQemuCpu: function(value) {
> if (!value) {
> return {};
>
applied, with fixups to make the linter happy, I'd suggest you add a git commit
hook which runs it for you ;-)
More information about the pve-devel
mailing list