Welcome to mirror list, hosted at ThFree Co, Russian Federation.

notes.rb « callbacks « work_items « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a86e2251e81f7170725780121109848e68f97a46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

module WorkItems
  module Callbacks
    class Notes < Base
      def before_update
        return unless params.present? && params.key?(:discussion_locked)
        return unless has_permission?(:set_work_item_metadata)

        work_item.discussion_locked = params[:discussion_locked]
      end
    end
  end
end