desktop target read capability
This commit is contained in:
1 parent
044fe778af
commit
39ec40d488
2 files changed
+17
-5
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}}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user