Files
threshold-ui/addons/api/addon/abilities/host-set.js
T
Cameron Perera 5e7e11fc6b 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
2022-11-09 14:22:28 -06:00

30 lines
513 B
JavaScript

import ModelAbility from './model';
/**
* Provides abilities for host sets.
*/
export default class HostSetAbility extends ModelAbility {
// =permissions
/**
* @type {boolean}
*/
get canAddHosts() {
return this.hasAuthorizedAction('add-hosts');
}
/**
* @type {boolean}
*/
get canRemoveHosts() {
return this.hasAuthorizedAction('remove-hosts');
}
/**
* @type {boolean}
*/
get canRead() {
return !this.model.isUnknown && this.hasAuthorizedAction('read');
}
}