Files
threshold-ui/addons/api/addon/abilities/storage-bucket.js
T

39 lines
758 B
JavaScript
Raw Normal View History

2023-03-09 08:57:50 -08:00
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ModelAbility from './model';
/**
* Provides abilities for storage buckets.
*/
export default class StorageBucketAbility extends ModelAbility {
// =services
// =permissions
/**
* Only "known" storage bucket types may be read.
* @type {boolean}
*/
get canRead() {
return !this.model.isUnknown && super.canRead;
2023-03-09 08:57:50 -08:00
}
/**
* Only "known" storage bucket types may be updated.
2023-03-09 08:57:50 -08:00
* @type {boolean}
*/
get canUpdate() {
return !this.model.isUnknown && super.canUpdate;
2023-03-09 08:57:50 -08:00
}
/**
* Only "known" storage bucket types may be deleted.
* @type {boolean}
*/
get canDelete() {
return !this.model.isUnknown && super.canDelete;
2023-03-09 08:57:50 -08:00
}
}