FIX: show 404 page when user is logged out and navigates to private message

This commit is contained in:
Arpit Jalan 2015-10-30 17:21:16 +05:30
parent 9f8d6b6088
commit 106cb9874a

View File

@ -86,13 +86,11 @@ class ApplicationController < ActionController::Base
rescue_from Discourse::NotLoggedIn do |e|
raise e if Rails.env.test?
if (request.format && request.format.json?) || request.xhr? || !request.get?
rescue_discourse_actions(:not_logged_in, 403, true)
else
redirect_to path("/")
rescue_discourse_actions(:not_found, 404)
end
end
rescue_from Discourse::NotFound do