2023-03-01 09:39:41 -06:00
|
|
|
/**
|
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
2021-08-12 16:24:16 -04:00
|
|
|
import ModelAbility from 'api/abilities/model';
|
|
|
|
|
|
2022-01-31 12:02:37 -05:00
|
|
|
export default class OverrideModelAbility extends ModelAbility {
|
|
|
|
|
/**
|
|
|
|
|
* Navigating to a resource is allowed if either list or create grants
|
|
|
|
|
* are present.
|
|
|
|
|
* @type {boolean}
|
|
|
|
|
*/
|
|
|
|
|
get canNavigate() {
|
|
|
|
|
return this.canList || this.canCreate;
|
|
|
|
|
}
|
|
|
|
|
}
|