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

archived_abilities.rb « concerns « policies « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b4dfad599c71d95ad9938b4848d9330f100e2458 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# frozen_string_literal: true

module ArchivedAbilities
  extend ActiveSupport::Concern

  ARCHIVED_ABILITIES = %i[
    admin_tag
    push_code
    push_to_delete_protected_branch
    request_access
    upload_file
    resolve_note
    create_merge_request_from
    create_merge_request_in
    award_emoji
    create_incident
  ].freeze

  ARCHIVED_FEATURES = %i[
    issue
    issue_board_list
    merge_request
    label
    milestone
    snippet
    wiki
    design
    note
    pipeline
    pipeline_schedule
    build
    trigger
    environment
    deployment
    commit_status
    container_image
    pages
    cluster
    release
  ].freeze

  class_methods do
    def archived_abilities
      ARCHIVED_ABILITIES
    end

    def archived_features
      ARCHIVED_FEATURES
    end
  end
end

ArchivedAbilities::ClassMethods.prepend_mod_with('ArchivedAbilities::ClassMethods')