From 72a71e9d17c75b11e82623cd9edd22ba70c9ba4f Mon Sep 17 00:00:00 2001
From: Kamil Trzcinski <ayufan@ayufan.eu>
Date: Mon, 16 May 2016 17:38:58 -0500
Subject: [PATCH] Show container registry item only when container registry is
 enabled

---
 app/helpers/projects_helper.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index 466929443d6..b6ba66bf3e5 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -152,7 +152,7 @@ module ProjectsHelper
       nav_tabs << :builds
     end
 
-    if can?(current_user, :read_container_image, project)
+    if project.container_registry_repository_url.present? && can?(current_user, :read_container_image, project)
       nav_tabs << :container_registry
     end
 
-- 
2.30.9