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:
authorMatija Čupić <matteeyah@gmail.com>2018-04-20 22:58:53 +0300
committerMatija Čupić <matteeyah@gmail.com>2018-04-20 22:58:53 +0300
commit45dadeec7d9f7b527cf4bc25800dcdbd13366ae6 (patch)
tree7eafdc9a96628bc59b6bffb98b4765c98b02f522 /app/controllers/projects/clusters
parente4c661a13888f9e3fab11dade6093575daf512de (diff)
Remove the GCP billing verification step
Diffstat (limited to 'app/controllers/projects/clusters')
-rw-r--r--app/controllers/projects/clusters/gcp_controller.rb18
1 files changed, 1 insertions, 17 deletions
diff --git a/app/controllers/projects/clusters/gcp_controller.rb b/app/controllers/projects/clusters/gcp_controller.rb
index 2d03c1f9f85..585f30cd7f8 100644
--- a/app/controllers/projects/clusters/gcp_controller.rb
+++ b/app/controllers/projects/clusters/gcp_controller.rb
@@ -2,8 +2,7 @@ class Projects::Clusters::GcpController < Projects::ApplicationController
before_action :authorize_read_cluster!
before_action :authorize_create_cluster!, only: [:new, :create]
before_action :authorize_google_api, except: [:login, :list_projects]
- before_action :get_gcp_projects, only: [:new, :create]
- before_action :verify_billing, only: [:create]
+ before_action :get_gcp_projects, only: [:new]
def login
begin
@@ -43,21 +42,6 @@ class Projects::Clusters::GcpController < Projects::ApplicationController
private
- def verify_billing
- case gcp_projects&.empty?
- when nil
- flash.now[:alert] = _('We could not verify that one of your projects on GCP has billing enabled. Please try again.')
- when true
- flash.now[:alert] = _('Please <a href=%{link_to_billing} target="_blank" rel="noopener noreferrer">enable billing for one of your projects to be able to create a Kubernetes cluster</a>, then try again.').html_safe % { link_to_billing: "https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral" }
- when false
- return
- end
-
- @cluster = ::Clusters::Cluster.new(create_params)
-
- render :new
- end
-
def create_params
params.require(:cluster).permit(
:enabled,