* 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
30 lines
513 B
JavaScript
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');
|
|
}
|
|
}
|