blob: 45392625e45285c8e9acc1b5e489304920070821 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# frozen_string_literal: true
module DependencyProxy
module GroupAccess
extend ActiveSupport::Concern
included do
before_action :verify_dependency_proxy_available!
before_action :authorize_read_dependency_proxy!
end
private
def verify_dependency_proxy_available!
render_404 unless group&.dependency_proxy_feature_available?
end
def authorize_read_dependency_proxy!
access_denied! unless can?(auth_user, :read_dependency_proxy, group)
end
end
end
|