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

34 lines
614 B
JavaScript
Raw Normal View History

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import ModelAbility from './model';
/**
* Provides abilities for workers.
*/
export default class WorkerAbility extends ModelAbility {
// =permissions
/**
* @type {boolean}
*/
get canCreateWorkerLed() {
return this.hasAuthorizedCollectionAction('create:worker-led');
}
2024-07-12 13:31:42 -05:00
/**
* @type {boolean}
*/
get canSetWorkerTags() {
return this.hasAuthorizedAction('set-worker-tags');
}
2024-07-12 13:31:42 -05:00
/**
* @type {boolean}
*/
get canRemoveTags() {
return this.hasAuthorizedAction('remove-worker-tags');
}
}