summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-06-16 15:01:27 +0200
committerJames Lopez <james@jameslopez.es>2016-06-16 15:01:27 +0200
commitb3a0a1c3155702e2deddade0fea3e79087b40da4 (patch)
tree096bf8b46f1d9dc4be16cf29551a27d8fd6c8d7b /config/routes.rb
parent8ac52f49c024775311a0736ddad964e85c8f6ed2 (diff)
parent2a747d386dbdc05453fce6b8be3f483e8cd9e796 (diff)
downloadgitlab-ce-b3a0a1c3155702e2deddade0fea3e79087b40da4.tar.gz
fixed merge conflicts on UI branch
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 549cf02b067..94ce8fb29d9 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -30,6 +30,11 @@ Rails.application.routes.draw do
mount LetterOpenerWeb::Engine, at: '/rails/letter_opener'
end
+ concern :access_requestable do
+ post :request_access, on: :collection
+ post :approve_access_request, on: :member
+ end
+
namespace :ci do
# CI API
Ci::API::API.logger Rails.logger
@@ -413,7 +418,7 @@ Rails.application.routes.draw do
end
scope module: :groups do
- resources :group_members, only: [:index, :create, :update, :destroy] do
+ resources :group_members, only: [:index, :create, :update, :destroy], concerns: :access_requestable do
post :resend_invite, on: :member
delete :leave, on: :collection
end
@@ -711,6 +716,8 @@ Rails.application.routes.draw do
end
end
+ resources :environments, only: [:index, :show, :new, :create, :destroy]
+
resources :builds, only: [:index, :show], constraints: { id: /\d+/ } do
collection do
post :cancel_all
@@ -729,6 +736,7 @@ Rails.application.routes.draw do
get :download
get :browse, path: 'browse(/*path)', format: false
get :file, path: 'file/*path', format: false
+ post :keep
end
end
@@ -772,7 +780,7 @@ Rails.application.routes.draw do
end
end
- resources :project_members, except: [:new, :edit], constraints: { id: /[a-zA-Z.\/0-9_\-#%+]+/ } do
+ resources :project_members, except: [:new, :edit], constraints: { id: /[a-zA-Z.\/0-9_\-#%+]+/ }, concerns: :access_requestable do
collection do
delete :leave
@@ -796,6 +804,8 @@ Rails.application.routes.draw do
end
end
+ resources :todos, only: [:create, :update], constraints: { id: /\d+/ }
+
resources :uploads, only: [:create] do
collection do
get ":secret/:filename", action: :show, as: :show, constraints: { filename: /[^\/]+/ }