Project

General

Profile

Bug #32883

Menu::Item doesn't use the `:if` option

Added by Ian Ballou 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

The `:if` option is saved into @condition, but it doesn't appear to be used anywhere: https://github.com/theforeman/foreman/blob/3347fa49d500964f0209122d8d36c920d1feafcc/app/registries/menu/item.rb#L14

One suggestion is to use @condition in the `to_hash` method to control if the menu item is used or not.

It is also advertised that a Proc can be passed into the `:if` option. This functionality should also be re-implemented. (https://github.com/theforeman/foreman/blob/develop/app/registries/menu/manager.rb#L60)

Associated revisions

Revision 0e7b3dd5 (diff)
Added by Ian Ballou 4 months ago

Fixes #32883 - Menu::Item doesn't use conditional option

History

#1 Updated by The Foreman Bot 4 months ago

  • Assignee set to Ian Ballou
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8622 added

#2 Updated by The Foreman Bot 4 months ago

  • Fixed in Releases 3.0.0 added

#3 Updated by Anonymous 4 months ago

  • Status changed from Ready For Testing to Closed

#4 Updated by Tomer Brisker 3 months ago

  • Category set to Web Interface

Also available in: Atom PDF