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

profile.rb « routes « config - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b4f00fa4ad826a6dcb4e2d93de253ecc7f9f2e76 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# frozen_string_literal: true

# for secondary email confirmations - uses the same confirmation controller as :users
devise_for :emails, path: 'profile/emails', controllers: { confirmations: :confirmations }

resource :profile, only: [:show, :update] do
  member do
    get :audit_log, to: redirect('-/user_settings/authentication_log')
    get :applications, to: 'oauth/applications#index'

    put :reset_incoming_email_token
    put :reset_feed_token
    put :reset_static_object_token
    put :update_username
  end

  scope module: :profiles do
    resource :account, only: [:show] do
      member do
        delete :unlink
      end
    end

    resource :notifications, only: [:show, :update] do
      scope(
        path: 'groups/*id',
        id: Gitlab::PathRegex.full_namespace_route_regex,
        as: :group,
        controller: :groups,
        constraints: { format: /(html|json)/ }
      ) do
        patch '/', action: :update
        put '/', action: :update
      end
    end

    resource :password, only: [:new, :create, :edit, :update] do
      member do
        put :reset
      end
    end

    resource :slack, only: [:edit] do
      member do
        get :slack_link
      end
    end

    resource :preferences, only: [:show, :update]

    resources :comment_templates, only: [:index, :show], action: :index

    resources :keys, only: [:index, :show, :create, :destroy] do
      member do
        delete :revoke
      end
    end

    resources :gpg_keys, only: [:index, :create, :destroy] do
      member do
        put :revoke
      end
    end
    resources :active_sessions, only: [:index, :destroy]
    resources :emails, only: [:index, :create, :destroy] do
      member do
        put :resend_confirmation_instructions
      end
    end

    resources :chat_names, only: [:index, :new, :create, :destroy] do
      collection do
        delete :deny
      end
    end

    resource :avatar, only: [:destroy]

    resources :personal_access_tokens, only: [:index, :create] do
      member do
        put :revoke
      end
    end

    resource :two_factor_auth, only: [:show, :create, :destroy] do
      member do
        post :codes
        patch :skip
        post :create_webauthn
      end
    end

    resources :webauthn_registrations, only: [:destroy]
  end
end