d7def242b8
* Starting on namespaced id * Traversal for variables uniqued by namespace * Delog * Basic CRUD complete w namespaces included * Correct secvar breadcrumb joining and testfix now that namespaces are included * Testfixes with namespaces in place * Namespace-aware duplicate path warning * Duplicate path warning test additions * Trimpath reimplemented on dupe check * Solves a bug where slash was not being passed to the can write check * PR fixes * variable paths integration test fix now uses store * Seems far less hacky in retrospect * PR feedback addressed * test fixes after inclusion of path as local non-model var * Prevent confusion by dropping namespace from QPs on PUT, since its already in .data * Solves a harsh bug where you have namespace access but no secvars access (#14098) * Solves a harsh bug where you have namespace access but no secvars access * Lint cleanup * Remove unneeded condition
71 lines
2.1 KiB
Handlebars
71 lines
2.1 KiB
Handlebars
{{page-title "Secure Variables"}}
|
||
<section class="section">
|
||
<div class="toolbar">
|
||
<div class="toolbar-item is-right-aligned is-mobile-full-width">
|
||
{{#if this.namespaceOptions}}
|
||
<SingleSelectDropdown
|
||
data-test-variable-namespace-filter
|
||
@label="Namespace"
|
||
@options={{this.namespaceOptions}}
|
||
@selection={{this.namespaceSelection}}
|
||
@onSelect={{this.setNamespace}}
|
||
/>
|
||
{{/if}}
|
||
<div class="button-bar">
|
||
{{#if (can "write variable" path="*" namespace=this.namespaceSelection)}}
|
||
<LinkTo
|
||
@route="variables.new"
|
||
class="button is-primary"
|
||
data-test-create-var
|
||
>
|
||
Create Secure Variable
|
||
</LinkTo>
|
||
{{else}}
|
||
<button
|
||
class="button is-primary is-disabled tooltip is-right-aligned"
|
||
aria-label="You don’t have sufficient permissions"
|
||
disabled
|
||
type="button"
|
||
data-test-disabled-create-var
|
||
>
|
||
Create Secure Variable
|
||
</button>
|
||
{{/if}}
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{{#if this.isForbidden}}
|
||
<ForbiddenMessage />
|
||
{{else}}
|
||
{{#if this.hasVariables}}
|
||
<VariablePaths
|
||
@branch={{this.root}}
|
||
/>
|
||
{{else}}
|
||
<div class="empty-message">
|
||
{{#if (eq this.namespaceSelection "*")}}
|
||
<h3 data-test-empty-variables-list-headline class="empty-message-headline">
|
||
No Secure Variables
|
||
</h3>
|
||
{{#if (can "write variable" path="*" namespace=this.namespaceSelection)}}
|
||
<p class="empty-message-body">
|
||
Get started by <LinkTo @route="variables.new">creating a new secure variable</LinkTo>
|
||
</p>
|
||
{{/if}}
|
||
{{else}}
|
||
<h3 data-test-no-matching-variables-list-headline class="empty-message-headline">
|
||
No Matches
|
||
</h3>
|
||
<p class="empty-message-body">
|
||
No paths or variables match the namespace
|
||
<strong>
|
||
{{this.namespaceSelection}}
|
||
</strong>
|
||
</p>
|
||
{{/if}}
|
||
</div>
|
||
{{/if}}
|
||
{{/if}}
|
||
</section>
|