Welcome to mirror list, hosted at ThFree Co, Russian Federation.

security_and_compliance_permissions.rb « concerns « controllers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 104f3638bb7df602e87776b0a34c1015a3ccf419 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module SecurityAndCompliancePermissions
  extend ActiveSupport::Concern

  included do
    before_action :ensure_security_and_compliance_enabled!
  end

  private

  def ensure_security_and_compliance_enabled!
    render_404 unless can?(current_user, :access_security_and_compliance, project)
  end
end