summaryrefslogtreecommitdiff
path: root/app/controllers/projects/wikis_controller.rb
diff options
context:
space:
mode:
authorDeAndre Harris <dharris@gitlab.com>2019-07-29 09:45:20 +0000
committerDeAndre Harris <dharris@gitlab.com>2019-07-29 09:45:20 +0000
commit88b4b9bd2e8224e17ff089d2a8ea99f800686b70 (patch)
tree67e6fadf31d75860f2158c05168f160d52ae46fe /app/controllers/projects/wikis_controller.rb
parent750fd7374ae67bb6ed4d9d875052bbc6d86d9b31 (diff)
parent77926ea02512d836c61a30e3986902e2d8e7f886 (diff)
downloadgitlab-ce-docs-troubleshoot-scim.tar.gz
Merge branch 'master' into 'docs-troubleshoot-scim'docs-troubleshoot-scim
# Conflicts: # doc/user/group/saml_sso/scim_setup.md
Diffstat (limited to 'app/controllers/projects/wikis_controller.rb')
-rw-r--r--app/controllers/projects/wikis_controller.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/projects/wikis_controller.rb b/app/controllers/projects/wikis_controller.rb
index fa5bdbc7d49..d1914c35bd3 100644
--- a/app/controllers/projects/wikis_controller.rb
+++ b/app/controllers/projects/wikis_controller.rb
@@ -6,11 +6,12 @@ class Projects::WikisController < Projects::ApplicationController
include Gitlab::Utils::StrongMemoize
before_action :authorize_read_wiki!
- before_action :authorize_create_wiki!, only: [:edit, :create, :history]
+ before_action :authorize_create_wiki!, only: [:edit, :create]
before_action :authorize_admin_wiki!, only: :destroy
before_action :load_project_wiki
before_action :load_page, only: [:show, :edit, :update, :history, :destroy]
- before_action :valid_encoding?, only: [:show, :edit, :update], if: :load_page
+ before_action :valid_encoding?,
+ if: -> { %w[show edit update].include?(action_name) && load_page }
before_action only: [:edit, :update], unless: :valid_encoding? do
redirect_to(project_wiki_path(@project, @page))
end