Commit 8b94d773 authored by Kamil Trzciński's avatar Kamil Trzciński

Add FF for Registry group browser

This adds a feature flag to hide
and selective enable container registry
browser for some projects
parent 3de8edb5
......@@ -4,6 +4,7 @@ module Groups
class RepositoriesController < Groups::ApplicationController
before_action :verify_container_registry_enabled!
before_action :authorize_read_container_image!
before_action :feature_flag_group_container_registry_browser!
def index
track_event(:list_repositories)
......@@ -22,6 +23,10 @@ module Groups
private
def feature_flag_group_container_registry_browser!
render_404 unless Feature.enabled?(:group_container_registry_browser, group)
end
def verify_container_registry_enabled!
render_404 unless Gitlab.config.registry.enabled
end
......
......@@ -22,7 +22,9 @@ module GroupsHelper
end
def group_container_registry_nav?
Gitlab.config.registry.enabled && can?(current_user, :read_container_image, @group)
Gitlab.config.registry.enabled &&
can?(current_user, :read_container_image, @group) &&
Feature.enabled?(:group_container_registry_browser, @group)
end
def group_sidebar_links
......
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