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.bumil...@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 ;-)

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to