remove "not public" error page

this is not used anymore:
* not logged in users are redirected to the login page
* logged in users see the normal 404 page
This commit is contained in:
Benjamin Neff 2016-03-07 02:27:40 +01:00
parent 017842cc01
commit e6b72b526f
4 changed files with 1 additions and 23 deletions

View file

@ -9,14 +9,7 @@ class PostsController < ApplicationController
respond_to :html, :mobile, :json, :xml respond_to :html, :mobile, :json, :xml
rescue_from Diaspora::NonPublic do rescue_from Diaspora::NonPublic do
if user_signed_in? authenticate_user!
@code = "not-public"
respond_to do |format|
format.all { render template: "errors/not_public", status: 404, layout: "error_page" }
end
else
authenticate_user!
end
end end
rescue_from Diaspora::NotMine do rescue_from Diaspora::NotMine do

View file

@ -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

View file

@ -91,9 +91,6 @@ en:
helper: helper:
invalid_fields: "Invalid fields" invalid_fields: "Invalid fields"
correct_the_following_errors_and_try_again: "Correct the following errors and try again." 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 <a href='%{login_link}'>login</a> and try again."
admins: admins:
admin_bar: admin_bar:

View file

@ -5,8 +5,6 @@ Then /^I should see the "(.*)" message$/ do |message|
I18n.translate('invitation_codes.excited', :name => @alice.name) I18n.translate('invitation_codes.excited', :name => @alice.name)
when "welcome to diaspora" when "welcome to diaspora"
I18n.translate('users.getting_started.well_hello_there') I18n.translate('users.getting_started.well_hello_there')
when 'post not public'
I18n.translate('error_messages.post_not_public_or_not_exist')
else else
raise "muriel, you don't have that message key, add one here" raise "muriel, you don't have that message key, add one here"
end end