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:
Diffstat (limited to 'app/controllers/projects/terraform_controller.rb')
-rw-r--r--app/controllers/projects/terraform_controller.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/controllers/projects/terraform_controller.rb b/app/controllers/projects/terraform_controller.rb
new file mode 100644
index 00000000000..aef163c98c5
--- /dev/null
+++ b/app/controllers/projects/terraform_controller.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class Projects::TerraformController < Projects::ApplicationController
+ before_action :authorize_can_read_terraform_state!
+
+ feature_category :infrastructure_as_code
+
+ def index
+ end
+
+ private
+
+ def authorize_can_read_terraform_state!
+ access_denied! unless can?(current_user, :read_terraform_state, project)
+ end
+end