Add and refactor Administration menu
What does this MR do?
In this MR, we're refactoring the Administration
menu. We're moving it from being a partial rendered menu to an object-driven menu, like all the menus in the project sidebar.
For that, we're just introducing a new object to store the menu info and removing the related info from the menu partial.
Screenshots or Screencasts (strongly suggested)
How to setup and validate locally (strongly suggested)
- Enable the feature flag
group_administration_nav_item
- Most of the menus in the
Administration
menu requires some configuration to be set. For example:-
::Gitlab::Auth::GroupSaml::Config.enabled?
needs to be enabled -
group.feature_available?(:group_saml)
needs to be enabled as well -
::License.feature_available?(:usage_quotas)
is required ::Gitlab::CurrentSettings.should_check_namespace_plan?
-
The easiest way to test this menu, although you won't be able to access the actual pages is to comment out:
- https://gitlab.com/gitlab-org/gitlab/blob/336968-fj-add-administration-menu/ee/lib/sidebars/groups/menus/administration_menu.rb#L44
- https://gitlab.com/gitlab-org/gitlab/blob/336968-fj-add-administration-menu/ee/lib/sidebars/groups/menus/administration_menu.rb#L57
- https://gitlab.com/gitlab-org/gitlab/blob/336968-fj-add-administration-menu/ee/lib/sidebars/groups/menus/administration_menu.rb#L74
Does this MR meet the acceptance criteria?
Conformity
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) -
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides. -
This change is backwards compatible across updates, or this does not apply.
Related to #336968 (closed)
Edited by Francisco Javier López