@fleetbase/ember-ui 0.3.24 → 0.3.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -161,8 +161,14 @@ export default class LayoutHeaderSmartNavMenuComponent extends Component {
161
161
  const raw = this.universe.headerMenuItems ?? [];
162
162
  const visible = [];
163
163
  for (const item of raw) {
164
+ // Shortcuts are not standalone extensions — they should be visible
165
+ // if and only if their parent extension is visible. Use _parentId
166
+ // for the ability check so the shortcut inherits the parent's
167
+ // permission rather than being checked against its own (non-existent)
168
+ // extension ability, which would always throw and default to visible.
169
+ const abilityId = item._isShortcut && item._parentId ? item._parentId : item.id;
164
170
  try {
165
- if (this.abilities.can(`${item.id} see extension`)) {
171
+ if (this.abilities.can(`${abilityId} see extension`)) {
166
172
  visible.push(item);
167
173
  }
168
174
  } catch (_) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetbase/ember-ui",
3
- "version": "0.3.24",
3
+ "version": "0.3.25",
4
4
  "description": "Fleetbase UI provides all the interface components, helpers, services and utilities for building a Fleetbase extension into the Console.",
5
5
  "keywords": [
6
6
  "fleetbase-ui",