Commit 56bcc27b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Hide packages nav & settings for starter license

Packages feature is only available in Premium so we should not show this
feature in settings and navigation
Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent b3bb56d4
......@@ -32,7 +32,9 @@ module EE
def get_project_nav_tabs(project, current_user)
nav_tabs = super
if ::Gitlab.config.packages.enabled && can?(current_user, :read_package, project)
if ::Gitlab.config.packages.enabled &&
project.feature_available?(:packages) &&
can?(current_user, :read_package, project)
nav_tabs << :packages
end
......@@ -60,7 +62,7 @@ module EE
override :project_permissions_panel_data
def project_permissions_panel_data(project)
super.merge(
packagesAvailable: ::Gitlab.config.packages.enabled,
packagesAvailable: ::Gitlab.config.packages.enabled && project.feature_available?(:packages),
packagesHelpPath: help_page_path('user/project/packages/maven_repository')
)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment