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

39 lines
760 B
JavaScript
Raw Normal View History

2023-03-09 08:57:50 -08:00
/**
2026-01-28 17:09:06 -08:00
* Copyright IBM Corp. 2021, 2026
* SPDX-License-Identifier: BUSL-1.1
2023-03-09 08:57:50 -08:00
*/
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
}
}