diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-13 15:10:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-13 15:10:03 +0300 |
commit | 75ee59f7a108cf0c57e1e66e3ef5e439bae24fcd (patch) | |
tree | b2f1ec89e16c6b27041f608c9fb12b7586e5ce94 /app/controllers/projects | |
parent | e79918ce90dc31527be1ef0140a99cfe450d931e (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.rb | 11 |
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 |