2016-08-16 15:05:44 -04:00
|
|
|
class CommitStatusPolicy < BasePolicy
|
2017-04-06 17:06:42 -04:00
|
|
|
delegate { @subject.project }
|
|
|
|
|
|
|
|
%w[read create update admin].each do |action|
|
|
|
|
rule { ~can?(:"#{action}_commit_status") }.prevent :"#{action}_build"
|
2016-08-16 15:05:44 -04:00
|
|
|
end
|
|
|
|
end
|