2021-01-29 00:20:46 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Groups
|
|
|
|
class DependencyProxiesController < Groups::ApplicationController
|
2021-10-27 15:23:28 +05:30
|
|
|
include ::DependencyProxy::GroupAccess
|
2021-01-29 00:20:46 +05:30
|
|
|
|
2022-01-26 12:08:38 +05:30
|
|
|
before_action :verify_dependency_proxy_enabled!
|
2021-01-29 00:20:46 +05:30
|
|
|
|
2022-07-16 23:28:13 +05:30
|
|
|
feature_category :dependency_proxy
|
|
|
|
urgency :low
|
2021-01-29 00:20:46 +05:30
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def dependency_proxy
|
|
|
|
@dependency_proxy ||=
|
2022-01-26 12:08:38 +05:30
|
|
|
group.dependency_proxy_setting || group.create_dependency_proxy_setting!
|
2021-01-29 00:20:46 +05:30
|
|
|
end
|
|
|
|
|
2022-01-26 12:08:38 +05:30
|
|
|
def verify_dependency_proxy_enabled!
|
|
|
|
render_404 unless dependency_proxy.enabled?
|
2021-01-29 00:20:46 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|