diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-04-20 21:58:53 +0200 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-04-20 21:58:53 +0200 |
commit | 45dadeec7d9f7b527cf4bc25800dcdbd13366ae6 (patch) | |
tree | 7eafdc9a96628bc59b6bffb98b4765c98b02f522 /app/controllers | |
parent | e4c661a13888f9e3fab11dade6093575daf512de (diff) | |
download | gitlab-ce-45dadeec7d9f7b527cf4bc25800dcdbd13366ae6.tar.gz |
Remove the GCP billing verification step
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/clusters/gcp_controller.rb | 18 |
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, |