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-04-13 15:10:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-13 15:10:03 +0300
commit75ee59f7a108cf0c57e1e66e3ef5e439bae24fcd (patch)
treeb2f1ec89e16c6b27041f608c9fb12b7586e5ce94 /app/controllers/projects
parente79918ce90dc31527be1ef0140a99cfe450d931e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/projects')
-rw-r--r--app/controllers/projects/static_site_editor_controller.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/projects/static_site_editor_controller.rb b/app/controllers/projects/static_site_editor_controller.rb
index 597bfccf422..98ec2335899 100644
--- a/app/controllers/projects/static_site_editor_controller.rb
+++ b/app/controllers/projects/static_site_editor_controller.rb
@@ -1,10 +1,21 @@
# frozen_string_literal: true
class Projects::StaticSiteEditorController < Projects::ApplicationController
+ include ExtractsPath
layout 'fullscreen'
prepend_before_action :authenticate_user!, only: [:show]
+ before_action :assign_ref_and_path, only: [:show]
def show
+ @config = Gitlab::StaticSiteEditor::Config.new(@repository, @ref, @path, params[:return_url])
+ end
+
+ private
+
+ def assign_ref_and_path
+ @ref, @path = extract_ref(params[:id])
+
+ render_404 if @ref.blank? || @path.blank?
end
end