Skip to content

Commit

Permalink
allow download on all masked PKI values
Browse files Browse the repository at this point in the history
  • Loading branch information
hashishaw committed Jul 6, 2023
1 parent 81e1599 commit 03d08aa
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
{{#if field.options.masked}}
<InfoTableRow @label={{or field.options.label (capitalize (humanize (dasherize field.name)))}}>
<MaskedInput
@name={{field.name}}
@value={{or (get @model field.name) null}}
@displayOnly={{true}}
@allowCopy={{true}}
Expand Down
1 change: 1 addition & 0 deletions ui/lib/pki/addon/components/page/pki-issuer-details.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
@value={{get @issuer attr.name}}
@displayOnly={{true}}
@allowCopy={{true}}
@allowDownload={{true}}
/>
</InfoTableRow>
{{else if (eq attr.name "keyId")}}
Expand Down
8 changes: 7 additions & 1 deletion ui/lib/pki/addon/components/page/pki-key-details.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@
{{/each}}
{{#if @key.privateKey}}
<InfoTableRow @label="Private key">
<MaskedInput @value={{@key.privateKey}} @name="Private key" @displayOnly={{true}} @allowCopy={{true}} />
<MaskedInput
@name="Private key"
@value={{@key.privateKey}}
@displayOnly={{true}}
@allowCopy={{true}}
@allowDownload={{true}}
/>
</InfoTableRow>
{{/if}}
</div>
8 changes: 7 additions & 1 deletion ui/lib/pki/addon/components/pki-generate-csr.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@
@addCopyButton={{eq attr.name "keyId"}}
>
{{#if (and attr.options.masked value)}}
<MaskedInput @value={{value}} @displayOnly={{true}} @allowCopy={{true}} />
<MaskedInput
@name={{attr.name}}
@value={{value}}
@displayOnly={{true}}
@allowCopy={{true}}
@allowDownload={{true}}
/>
{{else if (eq attr.name "keyId")}}
<LinkTo @route="keys.key.details" @model={{@model.keyId}}>
{{@model.keyId}}
Expand Down
16 changes: 14 additions & 2 deletions ui/lib/pki/addon/components/pki-generate-root.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@
<InfoTableRow
@label={{capitalize (or attr.options.detailsLabel attr.options.label (humanize (dasherize attr.name)))}}
>
<MaskedInput @value={{get @model attr.name}} @displayOnly={{true}} @allowCopy={{true}} />
<MaskedInput
@name={{attr.name}}
@value={{get @model attr.name}}
@displayOnly={{true}}
@allowCopy={{true}}
@allowDownload={{true}}
/>
</InfoTableRow>
{{else}}
<InfoTableRow
Expand All @@ -27,7 +33,13 @@
{{/each}}
<InfoTableRow @label="Private key">
{{#if @model.privateKey}}
<MaskedInput @value={{@model.privateKey}} @displayOnly={{true}} @allowCopy={{true}} />
<MaskedInput
@name="privateKey"
@value={{@model.privateKey}}
@displayOnly={{true}}
@allowCopy={{true}}
@allowDownload={{true}}
/>
{{else}}
<span class="tag">internal</span>
{{/if}}
Expand Down
8 changes: 7 additions & 1 deletion ui/lib/pki/addon/components/pki-info-table-rows.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
@addCopyButton={{or (eq attr.name "issuerId") (eq attr.name "keyId")}}
>
{{#if (and attr.options.masked value)}}
<MaskedInput @value={{value}} @displayOnly={{true}} @allowCopy={{true}} />
<MaskedInput
@name={{attr.name}}
@value={{value}}
@displayOnly={{true}}
@allowCopy={{true}}
@allowDownload={{true}}
/>
{{else if attr.options.detailLinkTo}}
<LinkTo @route={{attr.options.detailLinkTo}} @model={{value}}>{{value}}</LinkTo>
{{else if (or (eq attr.name "privateKey") (eq attr.name "privateKeyType"))}}
Expand Down
8 changes: 7 additions & 1 deletion ui/lib/pki/addon/components/pki-sign-intermediate-form.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
{{#let (find-by "name" fieldName @model.allFields) as |attr|}}
<InfoTableRow @label={{or attr.options.label (humanize (dasherize attr.name))}} @value={{get @model attr.name}}>
{{#if (and attr.options.masked (get @model attr.name))}}
<MaskedInput @value={{get @model attr.name}} @displayOnly={{true}} @allowCopy={{true}} />
<MaskedInput
@name={{attr.name}}
@value={{get @model attr.name}}
@displayOnly={{true}}
@allowCopy={{true}}
@allowDownload={{true}}
/>
{{else if (eq attr.name "serialNumber")}}
<LinkTo
@route="certificates.certificate.details"
Expand Down

0 comments on commit 03d08aa

Please sign in to comment.