Allow non-logged-in proper redirect for template posts (#1977)

This commit is contained in:
Ben Halpern 2019-03-04 15:50:36 -08:00 committed by GitHub
parent b271e96965
commit e491cf1f65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,7 +47,7 @@ class ArticlesController < ApplicationController
Article.new(body_markdown: @tag.submission_template_customized(@user.name),
processed_html: "", user_id: current_user&.id)
elsif @tag.present?
authorize Article
skip_authorization
Article.new(
body_markdown: "---\ntitle: \npublished: false\ndescription: \ntags: " + @tag.name + "\n---\n\n",
processed_html: "", user_id: current_user&.id