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-12-16 22:33:55 +05:30
|
|
|
rule { ~can?(:read_commit) }.prevent :create_note
|
2018-11-20 20:47:30 +05:30
|
|
|
end
|