debian-mirror-gitlab/app/policies/commit_policy.rb

9 lines
204 B
Ruby
Raw Normal View History

2018-11-20 20:47:30 +05:30
# frozen_string_literal: true
class CommitPolicy < BasePolicy
delegate { @subject.project }
2018-11-29 20:51:05 +05:30
rule { can?(:download_code) }.enable :read_commit
2019-10-31 01:37:42 +05:30
rule { ~can?(:read_commit) }.prevent :create_note
2018-11-20 20:47:30 +05:30
end