gitlab-org--gitlab-foss/app/policies/commit_status_policy.rb
gfyoung d5bf57a6af Enable frozen string in presenters and policies
Enable frozen string in:

* app/presenters
* app/policies

Partially addresses #47424.
2018-07-24 13:18:25 -07:00

9 lines
234 B
Ruby

# frozen_string_literal: true
class CommitStatusPolicy < BasePolicy
delegate { @subject.project }
%w[read create update admin].each do |action|
rule { ~can?(:"#{action}_commit_status") }.prevent :"#{action}_build"
end
end