Project

General

Profile

Actions

Bug #32883

closed

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

Added by Ian Ballou almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
-
Difficulty:
Triaged:
No
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)

Actions #1

Updated by The Foreman Bot almost 3 years ago

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

Updated by The Foreman Bot almost 3 years ago

  • Fixed in Releases 3.0.0 added
Actions #3

Updated by Anonymous almost 3 years ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by Tomer Brisker almost 3 years ago

  • Category set to Web Interface
Actions

Also available in: Atom PDF