Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 14:18:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 14:18:50 +0300
commit8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch)
treea77e7fe7a93de11213032ed4ab1f33a3db51b738 /lib/api/terraform
parent00b35af3db1abfe813a778f643dad221aad51fca (diff)
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'lib/api/terraform')
-rw-r--r--lib/api/terraform/state.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/terraform/state.rb b/lib/api/terraform/state.rb
index 5141d1fd499..e7c9627c753 100644
--- a/lib/api/terraform/state.rb
+++ b/lib/api/terraform/state.rb
@@ -32,7 +32,7 @@ module API
end
desc 'Get a terraform state by its name'
- route_setting :authentication, basic_auth_personal_access_token: true
+ route_setting :authentication, basic_auth_personal_access_token: true, job_token_allowed: :basic_auth
get do
remote_state_handler.find_with_lock do |state|
no_content! unless state.file.exists?
@@ -44,7 +44,7 @@ module API
end
desc 'Add a new terraform state or update an existing one'
- route_setting :authentication, basic_auth_personal_access_token: true
+ route_setting :authentication, basic_auth_personal_access_token: true, job_token_allowed: :basic_auth
post do
data = request.body.read
no_content! if data.empty?
@@ -57,7 +57,7 @@ module API
end
desc 'Delete a terraform state of a certain name'
- route_setting :authentication, basic_auth_personal_access_token: true
+ route_setting :authentication, basic_auth_personal_access_token: true, job_token_allowed: :basic_auth
delete do
remote_state_handler.handle_with_lock do |state|
state.destroy!
@@ -66,7 +66,7 @@ module API
end
desc 'Lock a terraform state of a certain name'
- route_setting :authentication, basic_auth_personal_access_token: true
+ route_setting :authentication, basic_auth_personal_access_token: true, job_token_allowed: :basic_auth
params do
requires :ID, type: String, limit: 255, desc: 'Terraform state lock ID'
requires :Operation, type: String, desc: 'Terraform operation'
@@ -103,7 +103,7 @@ module API
end
desc 'Unlock a terraform state of a certain name'
- route_setting :authentication, basic_auth_personal_access_token: true
+ route_setting :authentication, basic_auth_personal_access_token: true, job_token_allowed: :basic_auth
params do
optional :ID, type: String, limit: 255, desc: 'Terraform state lock ID'
end