Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Dharini <dharini@hashicorp.com>
35 lines
615 B
JavaScript
35 lines
615 B
JavaScript
/**
|
|
* Copyright IBM Corp. 2021, 2025
|
|
* 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');
|
|
}
|
|
|
|
/**
|
|
* @type {boolean}
|
|
*/
|
|
get canSetWorkerTags() {
|
|
return this.hasAuthorizedAction('set-worker-tags');
|
|
}
|
|
|
|
/**
|
|
* @type {boolean}
|
|
*/
|
|
get canRemoveTags() {
|
|
return this.hasAuthorizedAction('remove-worker-tags');
|
|
}
|
|
}
|