From 8db970f9f31d34c4898e90829440dde6ea1fb9a3 Mon Sep 17 00:00:00 2001 From: Albert Yi Date: Tue, 10 Jan 2017 15:06:34 -0800 Subject: [PATCH] skip api check for forum and comment endpoints --- app/controllers/comments_controller.rb | 1 + app/controllers/forum_posts_controller.rb | 3 ++- app/controllers/forum_topics_controller.rb | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 75a33ec0c..c224ed61e 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -2,6 +2,7 @@ class CommentsController < ApplicationController respond_to :html, :xml, :json before_filter :member_only, :except => [:index, :search, :show] rescue_from ActiveRecord::StatementInvalid, :with => :rescue_exception + skip_before_filter :api_check def index if params[:group_by] == "comment" diff --git a/app/controllers/forum_posts_controller.rb b/app/controllers/forum_posts_controller.rb index 99aa0e73c..2125886be 100644 --- a/app/controllers/forum_posts_controller.rb +++ b/app/controllers/forum_posts_controller.rb @@ -3,7 +3,8 @@ class ForumPostsController < ApplicationController before_filter :member_only, :except => [:index, :show] before_filter :load_post, :only => [:edit, :show, :update, :destroy, :undelete] before_filter :check_min_level, :only => [:edit, :show, :update, :destroy, :undelete] - + skip_before_filter :api_check + def new if params[:topic_id] @forum_topic = ForumTopic.find(params[:topic_id]) diff --git a/app/controllers/forum_topics_controller.rb b/app/controllers/forum_topics_controller.rb index b816f4d26..ac8643780 100644 --- a/app/controllers/forum_topics_controller.rb +++ b/app/controllers/forum_topics_controller.rb @@ -5,6 +5,7 @@ class ForumTopicsController < ApplicationController before_filter :normalize_search, :only => :index before_filter :load_topic, :only => [:edit, :show, :update, :destroy, :undelete, :new_merge, :create_merge, :subscribe, :unsubscribe] before_filter :check_min_level, :only => [:show, :edit, :update, :new_merge, :create_merge, :destroy, :undelete, :subscribe, :unsubscribe] + skip_before_filter :api_check def new @forum_topic = ForumTopic.new