2017-05-24 16:59:26 -04:00
|
|
|
require 'constraints/group_url_constrainer'
|
|
|
|
|
2016-11-07 08:34:25 -05:00
|
|
|
resources :groups, only: [:index, :new, :create]
|
2016-09-19 15:49:08 -04:00
|
|
|
|
2016-11-14 09:55:31 -05:00
|
|
|
scope(path: 'groups/*group_id',
|
2016-11-21 05:41:44 -05:00
|
|
|
module: :groups,
|
|
|
|
as: :group,
|
2017-05-24 16:59:26 -04:00
|
|
|
constraints: { group_id: Gitlab::PathRegex.full_namespace_route_regex }) do
|
2016-11-07 08:34:25 -05:00
|
|
|
resources :group_members, only: [:index, :create, :update, :destroy], concerns: :access_requestable do
|
|
|
|
post :resend_invite, on: :member
|
|
|
|
delete :leave, on: :collection
|
2016-10-05 08:21:27 -04:00
|
|
|
end
|
2016-11-07 08:34:25 -05:00
|
|
|
|
|
|
|
resource :avatar, only: [:destroy]
|
2017-07-07 11:08:49 -04:00
|
|
|
resources :milestones, constraints: { id: /[^\/]+/ }, only: [:index, :show, :edit, :update, :new, :create] do
|
2017-04-25 10:25:20 -04:00
|
|
|
member do
|
|
|
|
get :merge_requests
|
|
|
|
get :participants
|
|
|
|
get :labels
|
|
|
|
end
|
|
|
|
end
|
2016-11-14 17:42:44 -05:00
|
|
|
|
2016-12-06 11:50:48 -05:00
|
|
|
resources :labels, except: [:show] do
|
2016-11-14 17:42:44 -05:00
|
|
|
post :toggle_subscription, on: :member
|
|
|
|
end
|
2017-05-03 14:51:55 -04:00
|
|
|
|
2017-07-03 10:46:08 -04:00
|
|
|
scope path: '-' do
|
|
|
|
namespace :settings do
|
|
|
|
resource :ci_cd, only: [:show], controller: 'ci_cd'
|
|
|
|
end
|
2017-05-03 14:51:55 -04:00
|
|
|
|
2017-07-03 10:46:08 -04:00
|
|
|
resources :variables, only: [:index, :show, :update, :create, :destroy]
|
|
|
|
end
|
2016-10-05 08:21:27 -04:00
|
|
|
end
|
2016-11-07 08:34:25 -05:00
|
|
|
|
2016-12-06 11:50:48 -05:00
|
|
|
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-06 11:50:48 -05:00
|
|
|
get :edit, as: :edit_group
|
|
|
|
get :issues, as: :issues_group
|
|
|
|
get :merge_requests, as: :merge_requests_group
|
|
|
|
get :projects, as: :projects_group
|
|
|
|
get :activity, as: :activity_group
|
2017-01-24 10:32:34 -05:00
|
|
|
get :subgroups, as: :subgroups_group
|
2017-01-24 08:40:01 -05:00
|
|
|
get '/', action: :show, as: :group_canonical
|
2016-12-06 11:50:48 -05:00
|
|
|
end
|
2017-05-24 16:59:26 -04:00
|
|
|
|
|
|
|
constraints(GroupUrlConstrainer.new) do
|
|
|
|
scope(path: '*id',
|
|
|
|
as: :group,
|
|
|
|
constraints: { id: Gitlab::PathRegex.full_namespace_route_regex, format: /(html|json|atom)/ },
|
|
|
|
controller: :groups) do
|
|
|
|
get '/', action: :show
|
|
|
|
patch '/', action: :update
|
|
|
|
put '/', action: :update
|
|
|
|
delete '/', action: :destroy
|
|
|
|
end
|
|
|
|
end
|