debian-mirror-gitlab/app/policies/commit_policy.rb
2019-10-31 01:37:42 +05:30

8 lines
204 B
Ruby

# frozen_string_literal: true
class CommitPolicy < BasePolicy
delegate { @subject.project }
rule { can?(:download_code) }.enable :read_commit
rule { ~can?(:read_commit) }.prevent :create_note
end