diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index e95b0f48d..b40eebc33 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -9,14 +9,7 @@ class PostsController < ApplicationController respond_to :html, :mobile, :json, :xml rescue_from Diaspora::NonPublic do - if user_signed_in? - @code = "not-public" - respond_to do |format| - format.all { render template: "errors/not_public", status: 404, layout: "error_page" } - end - else - authenticate_user! - end + authenticate_user! end rescue_from Diaspora::NotMine do diff --git a/app/views/errors/not_public.haml b/app/views/errors/not_public.haml deleted file mode 100644 index bcd908b26..000000000 --- a/app/views/errors/not_public.haml +++ /dev/null @@ -1,10 +0,0 @@ --# Copyright (c) 2010-2012, Diaspora Inc. This file is --# licensed under the Affero General Public License version 3 or later. See --# the COPYRIGHT file. - -.transparent.big-number - 404 -%h3 - = t("error_messages.post_not_public_or_not_exist") -%p - = t("error_messages.login_try_again", login_link: new_user_session_path).html_safe diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 938196af9..45a531106 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -91,9 +91,6 @@ en: helper: invalid_fields: "Invalid fields" correct_the_following_errors_and_try_again: "Correct the following errors and try again." - post_not_public: "The post you are trying to view is not public!" - post_not_public_or_not_exist: "The post you are trying to view is not public, or does not exist!" - login_try_again: "Please login and try again." admins: admin_bar: diff --git a/features/step_definitions/message_steps.rb b/features/step_definitions/message_steps.rb index 43399d007..a85c1bd9d 100644 --- a/features/step_definitions/message_steps.rb +++ b/features/step_definitions/message_steps.rb @@ -5,8 +5,6 @@ Then /^I should see the "(.*)" message$/ do |message| I18n.translate('invitation_codes.excited', :name => @alice.name) when "welcome to diaspora" I18n.translate('users.getting_started.well_hello_there') - when 'post not public' - I18n.translate('error_messages.post_not_public_or_not_exist') else raise "muriel, you don't have that message key, add one here" end