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
|
|
|
|
2023-01-13 00:05:48 +05:30
|
|
|
rule { can?(:read_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
|