diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index 46a745313..f253514c2 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -42,13 +42,17 @@ class ArticlesController < ApplicationController @user = current_user @organization = @user&.organization @tag = Tag.find_by_name(params[:template]) - @article = if @tag&.submission_template.present? && @user + @article = if @tag.present? && @user&.editor_version == "v2" + authorize Article + Article.new(body_markdown: "", cached_tag_list: @tag.name, + processed_html: "") + elsif @tag&.submission_template.present? && @user authorize Article Article.new(body_markdown: @tag.submission_template_customized(@user.name), processed_html: "") else skip_authorization - if params[:state] == "v2" || Rails.env.development? + if @user&.editor_version == "v2" Article.new else Article.new( diff --git a/app/views/articles/new.html.erb b/app/views/articles/new.html.erb index 77b437d77..953024c3f 100644 --- a/app/views/articles/new.html.erb +++ b/app/views/articles/new.html.erb @@ -1,7 +1,7 @@ <% title "New Post" %> <% if user_signed_in? %> - <% if params[:state] == "v2" || current_user.editor_version == "v2" || (Rails.env.development? && params[:state] != "v1") %> + <% if current_user.editor_version == "v2" %> <%= javascript_pack_tag 'articleForm', defer: true %> <%= render 'articles/v2_form' %> <% else %>