2019-11-19 10:06:24 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-09-14 09:36:30 -04:00
|
|
|
# for secondary email confirmations - uses the same confirmation controller as :users
|
|
|
|
devise_for :emails, path: 'profile/emails', controllers: { confirmations: :confirmations }
|
|
|
|
|
2016-10-05 08:21:27 -04:00
|
|
|
resource :profile, only: [:show, :update] do
|
|
|
|
member do
|
|
|
|
get :audit_log
|
|
|
|
get :applications, to: 'oauth/applications#index'
|
|
|
|
|
2016-08-19 19:33:46 -04:00
|
|
|
put :reset_incoming_email_token
|
2018-05-31 10:01:04 -04:00
|
|
|
put :reset_feed_token
|
2019-07-22 10:56:40 -04:00
|
|
|
put :reset_static_object_token
|
2016-10-05 08:21:27 -04:00
|
|
|
put :update_username
|
|
|
|
end
|
|
|
|
|
|
|
|
scope module: :profiles do
|
|
|
|
resource :account, only: [:show] do
|
|
|
|
member do
|
|
|
|
delete :unlink
|
|
|
|
end
|
|
|
|
end
|
2019-02-15 12:56:13 -05:00
|
|
|
|
|
|
|
resource :notifications, only: [:show, :update] do
|
2020-08-07 23:10:13 -04:00
|
|
|
resources :groups, only: :update, constraints: { id: Gitlab::PathRegex.full_namespace_route_regex }
|
2019-02-15 12:56:13 -05:00
|
|
|
end
|
|
|
|
|
2016-10-05 08:21:27 -04:00
|
|
|
resource :password, only: [:new, :create, :edit, :update] do
|
|
|
|
member do
|
|
|
|
put :reset
|
|
|
|
end
|
|
|
|
end
|
|
|
|
resource :preferences, only: [:show, :update]
|
2017-02-24 07:18:07 -05:00
|
|
|
resources :keys, only: [:index, :show, :create, :destroy]
|
2017-07-12 01:59:28 -04:00
|
|
|
resources :gpg_keys, only: [:index, :create, :destroy] do
|
|
|
|
member do
|
|
|
|
put :revoke
|
|
|
|
end
|
|
|
|
end
|
2018-05-02 04:08:16 -04:00
|
|
|
resources :active_sessions, only: [:index, :destroy]
|
2017-09-09 09:55:07 -04:00
|
|
|
resources :emails, only: [:index, :create, :destroy] do
|
|
|
|
member do
|
|
|
|
put :resend_confirmation_instructions
|
|
|
|
end
|
|
|
|
end
|
2019-06-24 12:53:17 -04:00
|
|
|
|
2016-11-13 14:35:47 -05:00
|
|
|
resources :chat_names, only: [:index, :new, :create, :destroy] do
|
|
|
|
collection do
|
|
|
|
delete :deny
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-10-05 08:21:27 -04:00
|
|
|
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 :create_u2f
|
|
|
|
post :codes
|
|
|
|
patch :skip
|
2020-09-07 08:08:27 -04:00
|
|
|
post :create_webauthn
|
2016-10-05 08:21:27 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :u2f_registrations, only: [:destroy]
|
2020-09-07 08:08:27 -04:00
|
|
|
resources :webauthn_registrations, only: [:destroy]
|
2016-10-05 08:21:27 -04:00
|
|
|
end
|
|
|
|
end
|