Bug #32883
Menu::Item doesn't use the `:if` option
Pull request:
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
History
#1
Updated by The Foreman Bot 11 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 11 months ago
- Fixed in Releases 3.0.0 added
#3
Updated by Anonymous 11 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|0e7b3dd50bb930a0500ddc834146aecbb527a837.
#4
Updated by Tomer Brisker 9 months ago
- Category set to Web Interface
Fixes #32883 - Menu::Item doesn't use conditional option