summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-09-29 06:22:12 +0200
committerGitHub <noreply@github.com>2022-09-29 06:22:12 +0200
commit36f4c32a38ed85e5e658b34d36eac40a6147bc0c (patch)
tree11f796d6d764b9f6b3f94f43f4e22c8a2007d4a4 /app
parente623c302d5d4dfc05689eb8fb8e051e30fc38ec8 (diff)
Change path of privacy policy page (#19249)
Diffstat (limited to 'app')
-rw-r--r--app/controllers/about_controller.rb6
-rw-r--r--app/controllers/privacy_controller.rb22
-rw-r--r--app/javascript/mastodon/features/ui/components/link_footer.js2
-rw-r--r--app/views/layouts/public.html.haml5
-rw-r--r--app/views/privacy/show.html.haml (renamed from app/views/about/terms.html.haml)0
-rw-r--r--app/views/settings/deletes/show.html.haml2
-rw-r--r--app/views/user_mailer/confirmation_instructions.html.haml2
-rw-r--r--app/views/user_mailer/confirmation_instructions.text.erb4
8 files changed, 31 insertions, 12 deletions
diff --git a/app/controllers/about_controller.rb b/app/controllers/about_controller.rb
index d7e78d6b917..4fc2fbe3401 100644
--- a/app/controllers/about_controller.rb
+++ b/app/controllers/about_controller.rb
@@ -8,10 +8,10 @@ class AboutController < ApplicationController
before_action :require_open_federation!, only: [:show, :more]
before_action :set_body_classes, only: :show
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
- skip_before_action :require_functional!, only: [:more, :terms]
+ skip_before_action :require_functional!, only: [:more]
def show; end
@@ -26,8 +26,6 @@ class AboutController < ApplicationController
@blocks = DomainBlock.with_user_facing_limitations.by_severity if display_blocks?
end
- def terms; end
-
helper_method :display_blocks?
helper_method :display_blocks_rationale?
helper_method :public_fetch_mode?
diff --git a/app/controllers/privacy_controller.rb b/app/controllers/privacy_controller.rb
new file mode 100644
index 00000000000..ced84dbe5e2
--- /dev/null
+++ b/app/controllers/privacy_controller.rb
@@ -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
diff --git a/app/javascript/mastodon/features/ui/components/link_footer.js b/app/javascript/mastodon/features/ui/components/link_footer.js
index 8817bb6c166..dd05d03dd93 100644
--- a/app/javascript/mastodon/features/ui/components/link_footer.js
+++ b/app/javascript/mastodon/features/ui/components/link_footer.js
@@ -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='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) {
items.push(<a key='developers' href='/settings/applications' target='_blank'><FormattedMessage id='getting_started.developers' defaultMessage='Developers' /></a>);
diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml
index 83640de1a9d..14f86c97079 100644
--- a/app/views/layouts/public.html.haml
+++ b/app/views/layouts/public.html.haml
@@ -33,8 +33,7 @@
.column-0
%h4= t 'footer.resources'
%ul
- %li= link_to t('about.terms'), terms_path
- %li= link_to t('about.privacy_policy'), terms_path
+ %li= link_to t('about.privacy_policy'), privacy_policy_path
.column-1
%h4= t 'footer.developers'
%ul
@@ -57,6 +56,6 @@
.legal-xs
= 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'
diff --git a/app/views/about/terms.html.haml b/app/views/privacy/show.html.haml
index 9d076a91b41..9d076a91b41 100644
--- a/app/views/about/terms.html.haml
+++ b/app/views/privacy/show.html.haml
diff --git a/app/views/settings/deletes/show.html.haml b/app/views/settings/deletes/show.html.haml
index 08792e0afde..ddf0908794e 100644
--- a/app/views/settings/deletes/show.html.haml
+++ b/app/views/settings/deletes/show.html.haml
@@ -16,7 +16,7 @@
%li.positive-hint= t('deletes.warning.email_contact_html', email: Setting.site_contact_email)
%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/
diff --git a/app/views/user_mailer/confirmation_instructions.html.haml b/app/views/user_mailer/confirmation_instructions.html.haml
index 39a83faff83..447e689b407 100644
--- a/app/views/user_mailer/confirmation_instructions.html.haml
+++ b/app/views/user_mailer/confirmation_instructions.html.haml
@@ -77,4 +77,4 @@
%tbody
%tr
%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
diff --git a/app/views/user_mailer/confirmation_instructions.text.erb b/app/views/user_mailer/confirmation_instructions.text.erb
index aad91cd9d6a..a1b2ba7d2e4 100644
--- a/app/views/user_mailer/confirmation_instructions.text.erb
+++ b/app/views/user_mailer/confirmation_instructions.text.erb
@@ -6,7 +6,7 @@
=> <%= 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 %>
-=> <%= terms_url %>
+=> <%= privacy_policy_url %>