Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Dharini <dharini@hashicorp.com>
28 lines
470 B
JavaScript
28 lines
470 B
JavaScript
/**
|
|
* Copyright IBM Corp. 2021, 2025
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import ModelAbility from './model';
|
|
|
|
/**
|
|
* Provides abilities for groups.
|
|
*/
|
|
export default class GroupAbility extends ModelAbility {
|
|
// =permissions
|
|
|
|
/**
|
|
* @type {boolean}
|
|
*/
|
|
get canAddMembers() {
|
|
return this.hasAuthorizedAction('add-members');
|
|
}
|
|
|
|
/**
|
|
* @type {boolean}
|
|
*/
|
|
get canRemoveMembers() {
|
|
return this.hasAuthorizedAction('remove-members');
|
|
}
|
|
}
|