summaryrefslogtreecommitdiff
path: root/app/policies/commit_policy.rb
blob: 4b358c45ec29c4c66bc13c4182bef07f7f40b60c (plain)
1
2
3
4
5
6
7
8
# 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