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

commit_status_policy.rb « policies « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 24b2a4cc7fd7bb37cc51f86cc365cf1e975a1a74 (plain)
1
2
3
4
5
6
7
class CommitStatusPolicy < BasePolicy
  delegate { @subject.project }

  %w[read create update admin].each do |action|
    rule { ~can?(:"#{action}_commit_status") }.prevent :"#{action}_build"
  end
end