feat: 🎸 Add links to Host Sets assigned to targets (#1434)

* feat: 🎸 Add links to Host Sets assigned to targets

The target host sources view can now link to the host sets associated
with that target

✅ Closes: ICU-6525

* test: 💍 Improve test assert for host sources links
This commit is contained in:
Cameron Perera authored and GitHub committed 2022-11-09 14:22:28 -06:00
1 parent dfe3aee450
commit 5e7e11fc6b
3 files changed
+57 -2

No files matched your search

+8 -1
View File
@@ -3,7 +3,7 @@ import ModelAbility from './model';
/**
* Provides abilities for host sets.
*/
export default class UserAbility extends ModelAbility {
export default class HostSetAbility extends ModelAbility {
// =permissions
/**
@@ -19,4 +19,11 @@ export default class UserAbility extends ModelAbility {
get canRemoveHosts() {
return this.hasAuthorizedAction('remove-hosts');
}
/**
* @type {boolean}
*/
get canRead() {
return !this.model.isUnknown && this.hasAuthorizedAction('read');
}
}