2023-03-01 09:39:41 -06:00
|
|
|
/**
|
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
2021-10-01 14:19:06 -04:00
|
|
|
import ModelAbility from './model';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Provides abilities for users.
|
|
|
|
|
*/
|
|
|
|
|
export default class UserAbility extends ModelAbility {
|
|
|
|
|
// =permissions
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @type {boolean}
|
|
|
|
|
*/
|
|
|
|
|
get canAddAccounts() {
|
|
|
|
|
return this.hasAuthorizedAction('add-accounts');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @type {boolean}
|
|
|
|
|
*/
|
|
|
|
|
get canRemoveAccounts() {
|
|
|
|
|
return this.hasAuthorizedAction('remove-accounts');
|
|
|
|
|
}
|
|
|
|
|
}
|