diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/index.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/index.hbs index 99ca234d9..f7fd23120 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/index.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/index.hbs @@ -24,12 +24,16 @@ {{#each @model as |model|}} - + {{#if (can 'read model' model)}} + + {{model.displayName}} + + {{else}} {{model.displayName}} - + {{/if}} {{#if model.target.description}}

{{model.target.description}}

{{/if}} diff --git a/ui/desktop/electron-app/yarn.lock b/ui/desktop/electron-app/yarn.lock index 4da075baf..995107097 100644 --- a/ui/desktop/electron-app/yarn.lock +++ b/ui/desktop/electron-app/yarn.lock @@ -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" diff --git a/ui/desktop/tests/acceptance/projects/targets-test.js b/ui/desktop/tests/acceptance/projects/targets-test.js index 2fb027eec..bb253dd45 100644 --- a/ui/desktop/tests/acceptance/projects/targets-test.js +++ b/ui/desktop/tests/acceptance/projects/targets-test.js @@ -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);