2016-11-03 12:29:30 +05:30
|
|
|
namespace :admin do
|
2018-03-17 18:26:18 +05:30
|
|
|
resources :users, constraints: { id: %r{[a-zA-Z./0-9_\-]+} } do
|
2016-11-03 12:29:30 +05:30
|
|
|
resources :keys, only: [:show, :destroy]
|
|
|
|
resources :identities, except: [:show]
|
2017-08-17 22:00:37 +05:30
|
|
|
resources :impersonation_tokens, only: [:index, :create] do
|
|
|
|
member do
|
|
|
|
put :revoke
|
|
|
|
end
|
|
|
|
end
|
2016-11-03 12:29:30 +05:30
|
|
|
|
|
|
|
member do
|
|
|
|
get :projects
|
|
|
|
get :keys
|
|
|
|
put :block
|
|
|
|
put :unblock
|
|
|
|
put :unlock
|
|
|
|
put :confirm
|
|
|
|
post :impersonate
|
|
|
|
patch :disable_two_factor
|
|
|
|
delete 'remove/:email_id', action: 'remove_email', as: 'remove_email'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resource :impersonation, only: :destroy
|
|
|
|
|
|
|
|
resources :abuse_reports, only: [:index, :destroy]
|
2018-03-17 18:26:18 +05:30
|
|
|
resources :gitaly_servers, only: [:index]
|
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
resources :spam_logs, only: [:index, :destroy] do
|
|
|
|
member do
|
|
|
|
post :mark_as_ham
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :applications
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
resources :groups, only: [:index, :new, :create]
|
|
|
|
|
|
|
|
scope(path: 'groups/*id',
|
|
|
|
controller: :groups,
|
2017-09-10 17:25:29 +05:30
|
|
|
constraints: { id: Gitlab::PathRegex.full_namespace_route_regex, format: /(html|json|atom)/ }) do
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
scope(as: :group) do
|
2016-11-03 12:29:30 +05:30
|
|
|
put :members_update
|
2017-08-17 22:00:37 +05:30
|
|
|
get :edit, action: :edit
|
|
|
|
get '/', action: :show
|
|
|
|
patch '/', action: :update
|
|
|
|
put '/', action: :update
|
|
|
|
delete '/', action: :destroy
|
2016-11-03 12:29:30 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
resources :deploy_keys, only: [:index, :new, :create, :edit, :update, :destroy]
|
2016-11-03 12:29:30 +05:30
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
resources :hooks, only: [:index, :create, :edit, :update, :destroy] do
|
|
|
|
member do
|
2018-10-15 14:42:47 +05:30
|
|
|
post :test
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
2017-09-10 17:25:29 +05:30
|
|
|
|
|
|
|
resources :hook_logs, only: [:show] do
|
|
|
|
member do
|
2018-11-08 19:23:39 +05:30
|
|
|
post :retry
|
2017-09-10 17:25:29 +05:30
|
|
|
end
|
|
|
|
end
|
2016-11-03 12:29:30 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
resources :broadcast_messages, only: [:index, :edit, :create, :update, :destroy] do
|
|
|
|
post :preview, on: :collection
|
|
|
|
end
|
|
|
|
|
|
|
|
resource :logs, only: [:show]
|
2018-12-13 13:39:08 +05:30
|
|
|
resource :health_check, controller: 'health_check', only: [:show]
|
2016-11-03 12:29:30 +05:30
|
|
|
resource :background_jobs, controller: 'background_jobs', only: [:show]
|
2018-12-13 13:39:08 +05:30
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
resource :system_info, controller: 'system_info', only: [:show]
|
|
|
|
resources :requests_profiles, only: [:index, :show], param: :name, constraints: { name: /.+\.html/ }
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
resources :projects, only: [:index]
|
2016-11-03 12:29:30 +05:30
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
scope(path: 'projects/*namespace_id',
|
|
|
|
as: :namespace,
|
2017-09-10 17:25:29 +05:30
|
|
|
constraints: { namespace_id: Gitlab::PathRegex.full_namespace_route_regex }) do
|
2016-11-03 12:29:30 +05:30
|
|
|
resources(:projects,
|
|
|
|
path: '/',
|
2017-09-10 17:25:29 +05:30
|
|
|
constraints: { id: Gitlab::PathRegex.project_route_regex },
|
2017-08-17 22:00:37 +05:30
|
|
|
only: [:show]) do
|
2016-11-03 12:29:30 +05:30
|
|
|
|
|
|
|
member do
|
|
|
|
put :transfer
|
|
|
|
post :repository_check
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :runner_projects, only: [:create, :destroy]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resource :appearances, only: [:show, :create, :update], path: 'appearance' do
|
|
|
|
member do
|
2018-03-17 18:26:18 +05:30
|
|
|
get :preview_sign_in
|
2016-11-03 12:29:30 +05:30
|
|
|
delete :logo
|
|
|
|
delete :header_logos
|
2018-11-08 19:23:39 +05:30
|
|
|
delete :favicon
|
2016-11-03 12:29:30 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resource :application_settings, only: [:show, :update] do
|
|
|
|
resources :services, only: [:index, :edit, :update]
|
2018-12-13 13:39:08 +05:30
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
get :usage_data
|
2018-12-05 23:21:45 +05:30
|
|
|
put :reset_registration_token
|
2016-11-03 12:29:30 +05:30
|
|
|
put :reset_health_check_token
|
|
|
|
put :clear_repository_check_states
|
2018-12-05 23:21:45 +05:30
|
|
|
get :integrations, :repository, :templates, :ci_cd, :reporting, :metrics_and_profiling, :network, :geo, :preferences
|
2016-11-03 12:29:30 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
resources :labels
|
|
|
|
|
|
|
|
resources :runners, only: [:index, :show, :update, :destroy] do
|
|
|
|
member do
|
|
|
|
get :resume
|
|
|
|
get :pause
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
resources :jobs, only: :index do
|
2016-11-03 12:29:30 +05:30
|
|
|
collection do
|
|
|
|
post :cancel_all
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
root to: 'dashboard#index'
|
|
|
|
end
|