From bb9d7fad9f8d5b77144d4d0a21a6c7cdca243f6b Mon Sep 17 00:00:00 2001 From: Hinaloe Date: Mon, 20 May 2019 01:41:41 +0900 Subject: [PATCH 1/3] fix `isSubmitting` prop case (#10785) --- .../features/compose/containers/compose_form_container.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/compose/containers/compose_form_container.js b/app/javascript/mastodon/features/compose/containers/compose_form_container.js index 93a468388..37a0e8845 100644 --- a/app/javascript/mastodon/features/compose/containers/compose_form_container.js +++ b/app/javascript/mastodon/features/compose/containers/compose_form_container.js @@ -20,7 +20,7 @@ const mapStateToProps = state => ({ focusDate: state.getIn(['compose', 'focusDate']), caretPosition: state.getIn(['compose', 'caretPosition']), preselectDate: state.getIn(['compose', 'preselectDate']), - is_submitting: state.getIn(['compose', 'is_submitting']), + isSubmitting: state.getIn(['compose', 'is_submitting']), isChangingUpload: state.getIn(['compose', 'is_changing_upload']), isUploading: state.getIn(['compose', 'is_uploading']), showSearch: state.getIn(['search', 'submitted']) && !state.getIn(['search', 'hidden']), From 37a04c329c2b859f6a3aeb11795aec1da2943160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20=C4=BDach?= Date: Sun, 19 May 2019 19:27:32 +0200 Subject: [PATCH 2/3] sk.yml grammar update (#10786) * sk.yml grammar update * bundle exec i18n-tasks normalize --- config/locales/sk.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/locales/sk.yml b/config/locales/sk.yml index 5870a710a..ff0d69fb0 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -294,12 +294,12 @@ sk: suspend: vylúčený show: affected_accounts: - few: "%{count} účty v databáze ovplyvnených" - one: Jeden účet v databáze bol ovplyvnený - other: "%{count} účtov v databáze bolo ovplyvnených" + few: Je ovplyvnených %{count} účtov v databázi + one: Jeden účet v databázi bol ovplyvnený + other: "%{count} účty v databáze boli ovplyvnené" retroactive: silence: Zruš stíšenie všetkých momentálne utíšených účtov z tejto domény - suspend: Zruš suspendáciu všetkých momentálne odročených účtov z tejto domény + suspend: Zruš suspendáciu všetkých momentálne ovplyvnených účtov z tejto domény title: Zruš blokovanie domény %{domain} undo: Vráť späť undo: Odvolaj blokovanie domény From ae1838655876363065dd062a21064d385a90eb33 Mon Sep 17 00:00:00 2001 From: ThibG Date: Sun, 19 May 2019 21:40:36 +0200 Subject: [PATCH 3/3] =?UTF-8?q?Fix=20=E2=80=9Cinvited=20by=E2=80=9D=20not?= =?UTF-8?q?=20showing=20up=20for=20invited=20accounts=20in=20admin=20inter?= =?UTF-8?q?face=20(#10791)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 6 +++++- app/validators/blacklisted_email_validator.rb | 2 +- spec/validators/blacklisted_email_validator_spec.rb | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 6941b040d..3d1eb5f20 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -114,6 +114,10 @@ class User < ApplicationRecord end def invited? + invite_id.present? + end + + def valid_invitation? invite_id.present? && invite.valid_for_use? end @@ -274,7 +278,7 @@ class User < ApplicationRecord private def set_approved - self.approved = open_registrations? || invited? || external? + self.approved = open_registrations? || valid_invitation? || external? end def open_registrations? diff --git a/app/validators/blacklisted_email_validator.rb b/app/validators/blacklisted_email_validator.rb index a288c20ef..0d01a1c47 100644 --- a/app/validators/blacklisted_email_validator.rb +++ b/app/validators/blacklisted_email_validator.rb @@ -2,7 +2,7 @@ class BlacklistedEmailValidator < ActiveModel::Validator def validate(user) - return if user.invited? + return if user.valid_invitation? @email = user.email diff --git a/spec/validators/blacklisted_email_validator_spec.rb b/spec/validators/blacklisted_email_validator_spec.rb index 84b0107dd..ccc5dc0f4 100644 --- a/spec/validators/blacklisted_email_validator_spec.rb +++ b/spec/validators/blacklisted_email_validator_spec.rb @@ -8,7 +8,7 @@ RSpec.describe BlacklistedEmailValidator, type: :validator do let(:errors) { double(add: nil) } before do - allow(user).to receive(:invited?) { false } + allow(user).to receive(:valid_invitation?) { false } allow_any_instance_of(described_class).to receive(:blocked_email?) { blocked_email } described_class.new.validate(user) end