2023-03-01 09:39:41 -06:00
|
|
|
/**
|
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
2024-05-31 11:29:24 -07:00
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
2023-03-01 09:39:41 -06:00
|
|
|
*/
|
|
|
|
|
|
2022-01-26 13:27:25 -05:00
|
|
|
import ModelAbility from './model';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Provides abilities for host catalogs.
|
|
|
|
|
*/
|
|
|
|
|
export default class HostCatalogAbility extends ModelAbility {
|
|
|
|
|
// =permissions
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Only "known" host catalog types may be read.
|
|
|
|
|
* @type {boolean}
|
|
|
|
|
*/
|
|
|
|
|
get canRead() {
|
|
|
|
|
return !this.model.isUnknown && this.hasAuthorizedAction('read');
|
|
|
|
|
}
|
|
|
|
|
}
|