Files
threshold-ui/ui/admin/app/abilities/role.js
T
Lisbet AlvarezandZhihe Li 89e072401c Icu 13880 create manage scopes route and view with keyword values (#2342)
* feat: 🎸 manage scopes route and page

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13880

* Update addons/core/translations/resources/en-us.yaml

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>

* Update ui/admin/app/abilities/role.js

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>

* Update ui/admin/app/components/form/role/manage-scopes/index.hbs

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
---------

Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
2024-07-15 17:23:00 -07:00

18 lines
424 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import RoleAbility from 'api/abilities/role';
export default class OverrideRoleAbility extends RoleAbility {
/**
* This override ensures that a user can only set grant scopes
* on global and org level roles.
* @type {boolean}
*/
get canSetGrantScopes() {
return !this.model.scope.isProject && super.canSetGrantScopes;
}
}