debian-mirror-gitlab/app/policies/commit_policy.rb
2023-01-12 18:35:48 +00:00

8 lines
200 B
Ruby

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