mirror of
https://github.com/mastodon/mastodon.git
synced 2026-04-24 23:29:30 -05:00
Fix relative sign-up path in e-mail subscription notification (#38527)
Some checks failed
Check i18n / check-i18n (push) Waiting to run
Chromatic / Check for relevant changes (push) Waiting to run
Chromatic / Run Chromatic (push) Blocked by required conditions
CodeQL / Analyze (actions) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
CSS Linting / lint (push) Waiting to run
JavaScript Linting / lint (push) Waiting to run
Ruby Linting / lint (push) Waiting to run
JavaScript Testing / test (push) Waiting to run
Historical data migration test / test (14-alpine) (push) Waiting to run
Historical data migration test / test (15-alpine) (push) Waiting to run
Historical data migration test / test (16-alpine) (push) Waiting to run
Historical data migration test / test (17-alpine) (push) Waiting to run
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.3) (push) Blocked by required conditions
Ruby Testing / test (3.4) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.3) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.4) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.29) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.19.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.3, docker.elastic.co/elasticsearch/elasticsearch:7.17.29) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.4, docker.elastic.co/elasticsearch/elasticsearch:7.17.29) (push) Blocked by required conditions
Bundler Audit / security (push) Has been cancelled
Haml Linting / lint (push) Has been cancelled
Some checks failed
Check i18n / check-i18n (push) Waiting to run
Chromatic / Check for relevant changes (push) Waiting to run
Chromatic / Run Chromatic (push) Blocked by required conditions
CodeQL / Analyze (actions) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
CSS Linting / lint (push) Waiting to run
JavaScript Linting / lint (push) Waiting to run
Ruby Linting / lint (push) Waiting to run
JavaScript Testing / test (push) Waiting to run
Historical data migration test / test (14-alpine) (push) Waiting to run
Historical data migration test / test (15-alpine) (push) Waiting to run
Historical data migration test / test (16-alpine) (push) Waiting to run
Historical data migration test / test (17-alpine) (push) Waiting to run
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.3) (push) Blocked by required conditions
Ruby Testing / test (3.4) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.3) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.4) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.29) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.19.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.3, docker.elastic.co/elasticsearch/elasticsearch:7.17.29) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.4, docker.elastic.co/elasticsearch/elasticsearch:7.17.29) (push) Blocked by required conditions
Bundler Audit / security (push) Has been cancelled
Haml Linting / lint (push) Has been cancelled
This commit is contained in:
parent
ffcf87e023
commit
8a5d6dab5f
|
|
@ -34,11 +34,11 @@ module ApplicationHelper
|
|||
Setting.registrations_mode == 'none'
|
||||
end
|
||||
|
||||
def available_sign_up_path
|
||||
def available_sign_up_url
|
||||
if closed_registrations? || omniauth_only?
|
||||
'https://joinmastodon.org/#getting-started'
|
||||
'https://joinmastodon.org/'
|
||||
else
|
||||
ENV.fetch('SSO_ACCOUNT_SIGN_UP', new_user_registration_path)
|
||||
ENV.fetch('SSO_ACCOUNT_SIGN_UP', new_user_registration_url)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
%li= link_to_login t('auth.login')
|
||||
|
||||
- if controller_name != 'registrations'
|
||||
%li= link_to t('auth.register'), available_sign_up_path
|
||||
%li= link_to t('auth.register'), available_sign_up_url
|
||||
|
||||
- if controller_name != 'passwords' && controller_name != 'registrations'
|
||||
%li= link_to t('auth.forgot_password'), new_user_password_path
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
/[if mso]
|
||||
</td><td style="vertical-align:top;">
|
||||
%div
|
||||
= render 'application/mailer/button', text: t('.create_account'), url: available_sign_up_path, has_arrow: false
|
||||
= render 'application/mailer/button', text: t('.create_account'), url: available_sign_up_url, has_arrow: false
|
||||
/[if mso]
|
||||
</td></tr></table>
|
||||
|
||||
|
|
|
|||
|
|
@ -94,14 +94,14 @@ RSpec.describe ApplicationHelper do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'available_sign_up_path' do
|
||||
describe 'available_sign_up_url' do
|
||||
context 'when registrations are closed' do
|
||||
before do
|
||||
allow(Setting).to receive(:[]).with('registrations_mode').and_return 'none'
|
||||
end
|
||||
|
||||
it 'redirects to joinmastodon site' do
|
||||
expect(helper.available_sign_up_path).to match(/joinmastodon.org/)
|
||||
expect(helper.available_sign_up_url).to match(/joinmastodon.org/)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -113,13 +113,13 @@ RSpec.describe ApplicationHelper do
|
|||
end
|
||||
|
||||
it 'redirects to joinmastodon site' do
|
||||
expect(helper.available_sign_up_path).to match(/joinmastodon.org/)
|
||||
expect(helper.available_sign_up_url).to match(/joinmastodon.org/)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when registrations are allowed' do
|
||||
it 'returns a link to the registration page' do
|
||||
expect(helper.available_sign_up_path).to eq(new_user_registration_path)
|
||||
expect(helper.available_sign_up_url).to eq(new_user_registration_url)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user