forked from treehouse/mastodon
Change path of privacy policy page (#19249)
parent
e623c302d5
commit
36f4c32a38
|
@ -8,10 +8,10 @@ class AboutController < ApplicationController
|
||||||
before_action :require_open_federation!, only: [:show, :more]
|
before_action :require_open_federation!, only: [:show, :more]
|
||||||
before_action :set_body_classes, only: :show
|
before_action :set_body_classes, only: :show
|
||||||
before_action :set_instance_presenter
|
before_action :set_instance_presenter
|
||||||
before_action :set_expires_in, only: [:more, :terms]
|
before_action :set_expires_in, only: [:more]
|
||||||
before_action :set_registration_form_time, only: :show
|
before_action :set_registration_form_time, only: :show
|
||||||
|
|
||||||
skip_before_action :require_functional!, only: [:more, :terms]
|
skip_before_action :require_functional!, only: [:more]
|
||||||
|
|
||||||
def show; end
|
def show; end
|
||||||
|
|
||||||
|
@ -26,8 +26,6 @@ class AboutController < ApplicationController
|
||||||
@blocks = DomainBlock.with_user_facing_limitations.by_severity if display_blocks?
|
@blocks = DomainBlock.with_user_facing_limitations.by_severity if display_blocks?
|
||||||
end
|
end
|
||||||
|
|
||||||
def terms; end
|
|
||||||
|
|
||||||
helper_method :display_blocks?
|
helper_method :display_blocks?
|
||||||
helper_method :display_blocks_rationale?
|
helper_method :display_blocks_rationale?
|
||||||
helper_method :public_fetch_mode?
|
helper_method :public_fetch_mode?
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class PrivacyController < ApplicationController
|
||||||
|
layout 'public'
|
||||||
|
|
||||||
|
before_action :set_instance_presenter
|
||||||
|
before_action :set_expires_in
|
||||||
|
|
||||||
|
skip_before_action :require_functional!
|
||||||
|
|
||||||
|
def show; end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def set_instance_presenter
|
||||||
|
@instance_presenter = InstancePresenter.new
|
||||||
|
end
|
||||||
|
|
||||||
|
def set_expires_in
|
||||||
|
expires_in 0, public: true
|
||||||
|
end
|
||||||
|
end
|
|
@ -73,7 +73,7 @@ class LinkFooter extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
items.push(<a key='apps' href='https://joinmastodon.org/apps' target='_blank'><FormattedMessage id='navigation_bar.apps' defaultMessage='Mobile apps' /></a>);
|
items.push(<a key='apps' href='https://joinmastodon.org/apps' target='_blank'><FormattedMessage id='navigation_bar.apps' defaultMessage='Mobile apps' /></a>);
|
||||||
items.push(<a key='terms' href='/terms' target='_blank'><FormattedMessage id='getting_started.terms' defaultMessage='Terms of service' /></a>);
|
items.push(<a key='privacy-policy' href='/privacy-policy' target='_blank'><FormattedMessage id='getting_started.privacy_policy' defaultMessage='Privacy Policy' /></a>);
|
||||||
|
|
||||||
if (signedIn) {
|
if (signedIn) {
|
||||||
items.push(<a key='developers' href='/settings/applications' target='_blank'><FormattedMessage id='getting_started.developers' defaultMessage='Developers' /></a>);
|
items.push(<a key='developers' href='/settings/applications' target='_blank'><FormattedMessage id='getting_started.developers' defaultMessage='Developers' /></a>);
|
||||||
|
|
|
@ -33,8 +33,7 @@
|
||||||
.column-0
|
.column-0
|
||||||
%h4= t 'footer.resources'
|
%h4= t 'footer.resources'
|
||||||
%ul
|
%ul
|
||||||
%li= link_to t('about.terms'), terms_path
|
%li= link_to t('about.privacy_policy'), privacy_policy_path
|
||||||
%li= link_to t('about.privacy_policy'), terms_path
|
|
||||||
.column-1
|
.column-1
|
||||||
%h4= t 'footer.developers'
|
%h4= t 'footer.developers'
|
||||||
%ul
|
%ul
|
||||||
|
@ -57,6 +56,6 @@
|
||||||
.legal-xs
|
.legal-xs
|
||||||
= link_to "v#{Mastodon::Version.to_s}", Mastodon::Version.source_url
|
= link_to "v#{Mastodon::Version.to_s}", Mastodon::Version.source_url
|
||||||
·
|
·
|
||||||
= link_to t('about.privacy_policy'), terms_path
|
= link_to t('about.privacy_policy'), privacy_policy_path
|
||||||
|
|
||||||
= render template: 'layouts/application'
|
= render template: 'layouts/application'
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
%li.positive-hint= t('deletes.warning.email_contact_html', email: Setting.site_contact_email)
|
%li.positive-hint= t('deletes.warning.email_contact_html', email: Setting.site_contact_email)
|
||||||
%li.positive-hint= t('deletes.warning.username_available')
|
%li.positive-hint= t('deletes.warning.username_available')
|
||||||
|
|
||||||
%p.hint= t('deletes.warning.more_details_html', terms_path: terms_path)
|
%p.hint= t('deletes.warning.more_details_html', terms_path: privacy_policy_path)
|
||||||
|
|
||||||
%hr.spacer/
|
%hr.spacer/
|
||||||
|
|
||||||
|
|
|
@ -77,4 +77,4 @@
|
||||||
%tbody
|
%tbody
|
||||||
%tr
|
%tr
|
||||||
%td.column-cell.text-center
|
%td.column-cell.text-center
|
||||||
%p= t 'devise.mailer.confirmation_instructions.extra_html', terms_path: about_more_url, policy_path: terms_url
|
%p= t 'devise.mailer.confirmation_instructions.extra_html', terms_path: about_more_url, policy_path: privacy_policy_url
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
=> <%= confirmation_url(@resource, confirmation_token: @token, redirect_to_app: @resource.created_by_application ? 'true' : nil) %>
|
=> <%= confirmation_url(@resource, confirmation_token: @token, redirect_to_app: @resource.created_by_application ? 'true' : nil) %>
|
||||||
|
|
||||||
<%= strip_tags(t('devise.mailer.confirmation_instructions.extra_html', terms_path: about_more_url, policy_path: terms_url)) %>
|
<%= strip_tags(t('devise.mailer.confirmation_instructions.extra_html', terms_path: about_more_url, policy_path: privacy_policy_url)) %>
|
||||||
|
|
||||||
=> <%= about_more_url %>
|
=> <%= about_more_url %>
|
||||||
=> <%= terms_url %>
|
=> <%= privacy_policy_url %>
|
||||||
|
|
|
@ -28,7 +28,7 @@ en:
|
||||||
learn_more: Learn more
|
learn_more: Learn more
|
||||||
logged_in_as_html: You are currently logged in as %{username}.
|
logged_in_as_html: You are currently logged in as %{username}.
|
||||||
logout_before_registering: You are already logged in.
|
logout_before_registering: You are already logged in.
|
||||||
privacy_policy: Privacy policy
|
privacy_policy: Privacy Policy
|
||||||
rules: Server rules
|
rules: Server rules
|
||||||
rules_html: 'Below is a summary of rules you need to follow if you want to have an account on this server of Mastodon:'
|
rules_html: 'Below is a summary of rules you need to follow if you want to have an account on this server of Mastodon:'
|
||||||
see_whats_happening: See what's happening
|
see_whats_happening: See what's happening
|
||||||
|
@ -39,7 +39,6 @@ en:
|
||||||
other: posts
|
other: posts
|
||||||
status_count_before: Who published
|
status_count_before: Who published
|
||||||
tagline: Decentralized social network
|
tagline: Decentralized social network
|
||||||
terms: Terms of service
|
|
||||||
unavailable_content: Moderated servers
|
unavailable_content: Moderated servers
|
||||||
unavailable_content_description:
|
unavailable_content_description:
|
||||||
domain: Server
|
domain: Server
|
||||||
|
@ -797,8 +796,8 @@ en:
|
||||||
desc_html: Displayed in sidebar and meta tags. Describe what Mastodon is and what makes this server special in a single paragraph.
|
desc_html: Displayed in sidebar and meta tags. Describe what Mastodon is and what makes this server special in a single paragraph.
|
||||||
title: Short server description
|
title: Short server description
|
||||||
site_terms:
|
site_terms:
|
||||||
desc_html: You can write your own privacy policy, terms of service or other legalese. You can use HTML tags
|
desc_html: You can write your own privacy policy. You can use HTML tags
|
||||||
title: Custom terms of service
|
title: Custom privacy policy
|
||||||
site_title: Server name
|
site_title: Server name
|
||||||
thumbnail:
|
thumbnail:
|
||||||
desc_html: Used for previews via OpenGraph and API. 1200x630px recommended
|
desc_html: Used for previews via OpenGraph and API. 1200x630px recommended
|
||||||
|
@ -1720,7 +1719,7 @@ en:
|
||||||
<p>This document is CC-BY-SA. It was last updated May 26, 2022.</p>
|
<p>This document is CC-BY-SA. It was last updated May 26, 2022.</p>
|
||||||
|
|
||||||
<p>Originally adapted from the <a href="https://github.com/discourse/discourse">Discourse privacy policy</a>.</p>
|
<p>Originally adapted from the <a href="https://github.com/discourse/discourse">Discourse privacy policy</a>.</p>
|
||||||
title: "%{instance} Terms of Service and Privacy Policy"
|
title: "%{instance} Privacy Policy"
|
||||||
themes:
|
themes:
|
||||||
contrast: Mastodon (High contrast)
|
contrast: Mastodon (High contrast)
|
||||||
default: Mastodon (Dark)
|
default: Mastodon (Dark)
|
||||||
|
|
|
@ -640,7 +640,9 @@ Rails.application.routes.draw do
|
||||||
|
|
||||||
get '/about', to: 'about#show'
|
get '/about', to: 'about#show'
|
||||||
get '/about/more', to: 'about#more'
|
get '/about/more', to: 'about#more'
|
||||||
get '/terms', to: 'about#terms'
|
|
||||||
|
get '/privacy-policy', to: 'privacy#show', as: :privacy_policy
|
||||||
|
get '/terms', to: redirect('/privacy-policy')
|
||||||
|
|
||||||
match '/', via: [:post, :put, :patch, :delete], to: 'application#raise_not_found', format: false
|
match '/', via: [:post, :put, :patch, :delete], to: 'application#raise_not_found', format: false
|
||||||
match '*unmatched_route', via: :all, to: 'application#raise_not_found', format: false
|
match '*unmatched_route', via: :all, to: 'application#raise_not_found', format: false
|
||||||
|
|
|
@ -31,16 +31,6 @@ RSpec.describe AboutController, type: :controller do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'GET #terms' do
|
|
||||||
before do
|
|
||||||
get :terms
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'returns http success' do
|
|
||||||
expect(response).to have_http_status(200)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'helper_method :new_user' do
|
describe 'helper_method :new_user' do
|
||||||
it 'returns a new User' do
|
it 'returns a new User' do
|
||||||
user = @controller.view_context.new_user
|
user = @controller.view_context.new_user
|
||||||
|
|
Loading…
Reference in New Issue