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-09-20 17:31:16 -07:00
|
|
|
import ModelAbility from './model';
|
|
|
|
|
/**
|
|
|
|
|
* Provides abilities for credential.
|
|
|
|
|
*/
|
2023-02-01 13:46:23 -05:00
|
|
|
export default class CredentialLibraryAbility extends ModelAbility {
|
2022-09-20 17:31:16 -07:00
|
|
|
// =permissions
|
|
|
|
|
|
|
|
|
|
/**
|
2023-02-01 13:46:23 -05:00
|
|
|
* Only "known" credential library types may be read.
|
2022-09-20 17:31:16 -07:00
|
|
|
* @type {boolean}
|
|
|
|
|
*/
|
|
|
|
|
get canRead() {
|
|
|
|
|
return !this.model.isUnknown && this.hasAuthorizedAction('read');
|
|
|
|
|
}
|
|
|
|
|
}
|