2016-10-05 08:21:27 -04:00
|
|
|
namespace :admin do
|
2018-01-27 00:35:53 -05:00
|
|
|
resources :users, constraints: { id: %r{[a-zA-Z./0-9_\-]+} } do
|
2016-10-05 08:21:27 -04:00
|
|
|
resources :keys, only: [:show, :destroy]
|
|
|
|
resources :identities, except: [:show]
|
2017-02-23 12:47:06 -05:00
|
|
|
resources :impersonation_tokens, only: [:index, :create] do
|
2017-01-06 11:00:46 -05:00
|
|
|
member do
|
|
|
|
put :revoke
|
|
|
|
end
|
|
|
|
end
|
2016-10-05 08:21:27 -04:00
|
|
|
|
|
|
|
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-01-30 05:11:47 -05:00
|
|
|
resources :gitaly_servers, only: [:index]
|
|
|
|
|
2016-10-05 08:21:27 -04:00
|
|
|
resources :spam_logs, only: [:index, :destroy] do
|
|
|
|
member do
|
|
|
|
post :mark_as_ham
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :applications
|
|
|
|
|
2016-12-08 13:59:41 -05:00
|
|
|
resources :groups, only: [:index, :new, :create]
|
|
|
|
|
|
|
|
scope(path: 'groups/*id',
|
|
|
|
controller: :groups,
|
2017-05-24 16:59:26 -04:00
|
|
|
constraints: { id: Gitlab::PathRegex.full_namespace_route_regex, format: /(html|json|atom)/ }) do
|
2016-12-08 13:59:41 -05:00
|
|
|
|
|
|
|
scope(as: :group) do
|
2016-10-05 08:21:27 -04:00
|
|
|
put :members_update
|
2016-12-08 13:59:41 -05:00
|
|
|
get :edit, action: :edit
|
|
|
|
get '/', action: :show
|
|
|
|
patch '/', action: :update
|
|
|
|
put '/', action: :update
|
|
|
|
delete '/', action: :destroy
|
2016-10-05 08:21:27 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-03-31 08:54:38 -04:00
|
|
|
resources :deploy_keys, only: [:index, :new, :create, :edit, :update, :destroy]
|
2016-10-05 08:21:27 -04:00
|
|
|
|
2017-04-20 04:31:37 -04:00
|
|
|
resources :hooks, only: [:index, :create, :edit, :update, :destroy] do
|
|
|
|
member do
|
2018-06-21 04:38:59 -04:00
|
|
|
post :test
|
2017-04-20 04:31:37 -04:00
|
|
|
end
|
2017-04-27 06:08:57 -04:00
|
|
|
|
|
|
|
resources :hook_logs, only: [:show] do
|
|
|
|
member do
|
2018-08-24 12:52:23 -04:00
|
|
|
post :retry
|
2017-04-27 06:08:57 -04:00
|
|
|
end
|
|
|
|
end
|
2016-10-05 08:21:27 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
resources :broadcast_messages, only: [:index, :edit, :create, :update, :destroy] do
|
|
|
|
post :preview, on: :collection
|
|
|
|
end
|
|
|
|
|
|
|
|
resource :logs, only: [:show]
|
2017-05-17 12:17:15 -04:00
|
|
|
resource :health_check, controller: 'health_check', only: [:show] do
|
|
|
|
post :reset_storage_health
|
|
|
|
end
|
2016-10-05 08:21:27 -04:00
|
|
|
resource :background_jobs, controller: 'background_jobs', only: [:show]
|
|
|
|
resource :system_info, controller: 'system_info', only: [:show]
|
|
|
|
resources :requests_profiles, only: [:index, :show], param: :name, constraints: { name: /.+\.html/ }
|
|
|
|
|
2016-12-08 13:59:41 -05:00
|
|
|
resources :projects, only: [:index]
|
2016-10-05 08:21:27 -04:00
|
|
|
|
2017-05-19 20:46:40 -04:00
|
|
|
scope(path: 'projects/*namespace_id',
|
|
|
|
as: :namespace,
|
2017-05-24 16:59:26 -04:00
|
|
|
constraints: { namespace_id: Gitlab::PathRegex.full_namespace_route_regex }) do
|
2016-10-05 08:21:27 -04:00
|
|
|
resources(:projects,
|
|
|
|
path: '/',
|
2017-05-24 16:59:26 -04:00
|
|
|
constraints: { id: Gitlab::PathRegex.project_route_regex },
|
2016-12-08 13:59:41 -05:00
|
|
|
only: [:show]) do
|
2016-10-05 08:21:27 -04:00
|
|
|
|
|
|
|
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
|
2017-11-22 08:48:38 -05:00
|
|
|
get :preview_sign_in
|
2016-10-05 08:21:27 -04:00
|
|
|
delete :logo
|
|
|
|
delete :header_logos
|
2017-09-26 03:54:32 -04:00
|
|
|
delete :favicon
|
2016-10-05 08:21:27 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resource :application_settings, only: [:show, :update] do
|
|
|
|
resources :services, only: [:index, :edit, :update]
|
2017-04-05 08:29:48 -04:00
|
|
|
get :usage_data
|
2016-10-05 08:21:27 -04:00
|
|
|
put :reset_runners_token
|
|
|
|
put :reset_health_check_token
|
|
|
|
put :clear_repository_check_states
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :labels
|
|
|
|
|
|
|
|
resources :runners, only: [:index, :show, :update, :destroy] do
|
|
|
|
member do
|
|
|
|
get :resume
|
|
|
|
get :pause
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-05-16 07:41:15 -04:00
|
|
|
resources :jobs, only: :index do
|
2016-10-05 08:21:27 -04:00
|
|
|
collection do
|
|
|
|
post :cancel_all
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
root to: 'dashboard#index'
|
|
|
|
end
|