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/tests/acceptance/projects/targets-test.js b/ui/desktop/tests/acceptance/projects/targets-test.js index 2fb027eec..898a04222 100644 --- a/ui/desktop/tests/acceptance/projects/targets-test.js +++ b/ui/desktop/tests/acceptance/projects/targets-test.js @@ -209,6 +209,14 @@ module('Acceptance | projects | targets', function (hooks) { await visit(urls.targets); }); + test('cannot navigate to an account form without proper authorization', async function (assert) { + assert.expect(1); + instances.target.authorized_actions = + instances.target.authorized_actions.filter((item) => item !== 'read'); + await visit(urls.target); + assert.notOk(find('main tbody .rose-table-header-cell:nth-child(1) a')); + }); + test('connecting to a target', async function (assert) { assert.expect(4); stubs.ipcService.withArgs('cliExists').returns(true);