2018-08-10 12:15:25 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-07-21 04:52:07 -04:00
|
|
|
class CommitPolicy < BasePolicy
|
|
|
|
delegate { @subject.project }
|
2018-11-28 14:04:15 -05:00
|
|
|
|
|
|
|
rule { can?(:download_code) }.enable :read_commit
|
2019-10-29 11:58:26 -04:00
|
|
|
rule { ~can?(:read_commit) }.prevent :create_note
|
2018-07-21 04:52:07 -04:00
|
|
|
end
|