2020-01-01 13:55:28 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
# for secondary email confirmations - uses the same confirmation controller as :users
|
|
|
|
devise_for :emails, path: 'profile/emails', controllers: { confirmations: :confirmations }
|
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
resource :profile, only: [:show, :update] do
|
|
|
|
member do
|
|
|
|
get :audit_log
|
|
|
|
get :applications, to: 'oauth/applications#index'
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
put :reset_incoming_email_token
|
2018-11-08 19:23:39 +05:30
|
|
|
put :reset_feed_token
|
2019-12-04 20:38:33 +05:30
|
|
|
put :reset_static_object_token
|
2016-11-03 12:29:30 +05:30
|
|
|
put :update_username
|
|
|
|
end
|
|
|
|
|
|
|
|
scope module: :profiles do
|
|
|
|
resource :account, only: [:show] do
|
|
|
|
member do
|
|
|
|
delete :unlink
|
|
|
|
end
|
|
|
|
end
|
2019-09-04 21:01:54 +05:30
|
|
|
|
|
|
|
resource :notifications, only: [:show, :update] do
|
2022-01-26 12:08:38 +05:30
|
|
|
scope(path: 'groups/*id',
|
2022-08-27 11:52:29 +05:30
|
|
|
id: Gitlab::PathRegex.full_namespace_route_regex,
|
|
|
|
as: :group,
|
|
|
|
controller: :groups,
|
|
|
|
constraints: { format: /(html|json)/ }) do
|
2022-01-26 12:08:38 +05:30
|
|
|
patch '/', action: :update
|
|
|
|
put '/', action: :update
|
|
|
|
end
|
2019-09-04 21:01:54 +05:30
|
|
|
end
|
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
resource :password, only: [:new, :create, :edit, :update] do
|
|
|
|
member do
|
|
|
|
put :reset
|
|
|
|
end
|
|
|
|
end
|
|
|
|
resource :preferences, only: [:show, :update]
|
2023-04-23 21:23:45 +05:30
|
|
|
|
2023-05-27 22:25:52 +05:30
|
|
|
resources :saved_replies, only: [:index, :show], action: :index
|
2023-04-23 21:23:45 +05:30
|
|
|
|
|
|
|
resources :keys, only: [:index, :show, :create, :destroy] do
|
|
|
|
member do
|
|
|
|
delete :revoke
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
resources :gpg_keys, only: [:index, :create, :destroy] do
|
|
|
|
member do
|
|
|
|
put :revoke
|
|
|
|
end
|
|
|
|
end
|
2018-10-15 14:42:47 +05:30
|
|
|
resources :active_sessions, only: [:index, :destroy]
|
2018-03-17 18:26:18 +05:30
|
|
|
resources :emails, only: [:index, :create, :destroy] do
|
|
|
|
member do
|
|
|
|
put :resend_confirmation_instructions
|
|
|
|
end
|
|
|
|
end
|
2019-09-30 21:07:59 +05:30
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
resources :chat_names, only: [:index, :new, :create, :destroy] do
|
|
|
|
collection do
|
|
|
|
delete :deny
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
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
|
2020-11-24 15:15:51 +05:30
|
|
|
post :create_webauthn
|
2016-11-03 12:29:30 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :u2f_registrations, only: [:destroy]
|
2020-11-24 15:15:51 +05:30
|
|
|
resources :webauthn_registrations, only: [:destroy]
|
2016-11-03 12:29:30 +05:30
|
|
|
end
|
|
|
|
end
|