2020-11-13 16:09:31 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Groups
|
|
|
|
class DependencyProxiesController < Groups::ApplicationController
|
2021-08-04 05:08:21 -04:00
|
|
|
include ::DependencyProxy::GroupAccess
|
2020-11-13 16:09:31 -05:00
|
|
|
|
2021-12-10 13:14:42 -05:00
|
|
|
before_action :verify_dependency_proxy_enabled!
|
2020-11-13 16:09:31 -05:00
|
|
|
|
2022-04-26 05:08:59 -04:00
|
|
|
feature_category :dependency_proxy
|
2022-05-06 17:08:35 -04:00
|
|
|
urgency :low
|
2020-11-13 16:09:31 -05:00
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def dependency_proxy
|
|
|
|
@dependency_proxy ||=
|
2021-12-10 13:14:42 -05:00
|
|
|
group.dependency_proxy_setting || group.create_dependency_proxy_setting!
|
2020-11-13 16:09:31 -05:00
|
|
|
end
|
|
|
|
|
2021-12-10 13:14:42 -05:00
|
|
|
def verify_dependency_proxy_enabled!
|
|
|
|
render_404 unless dependency_proxy.enabled?
|
2020-11-13 16:09:31 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|