Merge pull request #711 from hashicorp/desktop-target-capability

Desktop target capability
This commit is contained in:
Dharini Jeeva authored and GitHub committed 2021-08-19 15:03:51 -07:00
commit 5a1e3e235a
3 files changed
+24 -9

No files matched your search

@@ -24,12 +24,16 @@
{{#each @model as |model|}}
<body.row as |row|>
<row.headerCell>
<LinkTo
@route='scopes.scope.projects.targets.target'
@model={{model.id}}
>
{{#if (can 'read model' model)}}
<LinkTo
@route='scopes.scope.projects.targets.target'
@model={{model.id}}
>
{{model.displayName}}
</LinkTo>
{{else}}
{{model.displayName}}
</LinkTo>
{{/if}}
{{#if model.target.description}}
<p>{{model.target.description}}</p>
{{/if}}
+4 -4
View File
@@ -2080,10 +2080,10 @@ jsprim@^1.2.2:
json-schema "0.2.3"
verror "1.10.0"
jszip@^3.1.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.6.0.tgz#839b72812e3f97819cc13ac4134ffced95dd6af9"
integrity sha512-jgnQoG9LKnWO3mnVNBnfhkh0QknICd1FGSrXcgrl67zioyJ4wgx25o9ZqwNtrROSflGBCGYnJfjrIyRIby1OoQ==
jszip@^3.1.0, jszip@^3.7.0:
version "3.7.1"
resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.7.1.tgz#bd63401221c15625a1228c556ca8a68da6fda3d9"
integrity sha512-ghL0tz1XG9ZEmRMcEN2vt7xabrDdqHHeykgARpmZ0BiIctWxM47Vt63ZO2dnp4QYt/xJVLLy5Zv1l/xRdh2byg==
dependencies:
lie "~3.3.0"
pako "~1.0.2"
@@ -209,6 +209,17 @@ module('Acceptance | projects | targets', function (hooks) {
await visit(urls.targets);
});
test('cannot navigate to a target without proper authorization', async function (assert) {
assert.expect(1);
instances.target.authorized_actions =
instances.target.authorized_actions.filter((item) => item !== 'read');
later(async () => {
run.cancelTimers();
assert.notOk(find('main tbody .rose-table-header-cell:nth-child(1) a'));
}, 750);
await visit(urls.targets);
});
test('connecting to a target', async function (assert) {
assert.expect(4);
stubs.ipcService.withArgs('cliExists').returns(true);