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

project_features_changed_event.rb « projects « events « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a0c6fa1a3f988e62bc84d7169ebb9c767c2950b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

module Projects
  class ProjectFeaturesChangedEvent < ::Gitlab::EventStore::Event
    def schema
      {
        'type' => 'object',
        'properties' => {
          'project_id' => { 'type' => 'integer' },
          'namespace_id' => { 'type' => 'integer' },
          'root_namespace_id' => { 'type' => 'integer' },
          'features' => { 'type' => 'array' }
        },
        'required' => %w[project_id namespace_id root_namespace_id features]
      }
    end

    def pages_related?
      data[:features].include?("pages_access_level")
    end
  end
end