diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 401d9ed6230..3bd33fa4fb7 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -381,8 +381,6 @@ class UsersController < ApplicationController success: false, message: I18n.t("login.something_already_taken") } - rescue RestClient::Forbidden - render json: { errors: [I18n.t("discourse_hub.access_token_problem")] } end def get_honeypot_value diff --git a/config/locales/server.ar.yml b/config/locales/server.ar.yml index 5fc265524a8..b975edabe28 100644 --- a/config/locales/server.ar.yml +++ b/config/locales/server.ar.yml @@ -1766,8 +1766,6 @@ ar: error: "خطأ!" email_input: "مدير البريد الإيكتروني" submit_button: "أرسل البريد الإلكتروني" - discourse_hub: - access_token_problem: "أخبر المدير : أرجوك قم بتحديث إعدادات الموقع لإضافة مفتاح الدخول الصحيح لـ ديسكورس" performance_report: initial_post_raw: 'هذا الموضوع يحتوي على معلومات الاداء اليومي للموقع ' initial_topic_title: التبليغ عن اداء الموقع diff --git a/config/locales/server.da.yml b/config/locales/server.da.yml index da593c43b94..4c2840e2b1c 100644 --- a/config/locales/server.da.yml +++ b/config/locales/server.da.yml @@ -1463,8 +1463,6 @@ da: error: "Fejl!" email_input: "Admin email" submit_button: "Send email" - discourse_hub: - access_token_problem: "Fortæl en admin: Venligst opdater indstillingerne så de inkluderer den korrekte discourse_org_access_key." performance_report: initial_post_raw: Dette emne inkluderer daglige præstationsrapporter for dit site. initial_topic_title: Website præstationsrapport diff --git a/config/locales/server.de.yml b/config/locales/server.de.yml index bdb6ebb192a..f61a15e1391 100644 --- a/config/locales/server.de.yml +++ b/config/locales/server.de.yml @@ -2834,8 +2834,6 @@ de: error: "Fehler!" email_input: "Administrator-E-Mail" submit_button: "E-Mail senden" - discourse_hub: - access_token_problem: "Gib das hier an einen Administrator weiter: Bitte aktualisieren Sie die Siteneinstellungen für den korrekten discourse_org_access_key." performance_report: initial_post_raw: Dieser Beitrag enthält tägliche Leistungsberichte deiner Site. initial_topic_title: Berichte zur Websitegeschwindigkeit diff --git a/config/locales/server.el.yml b/config/locales/server.el.yml index 397b742506e..ca5e1cbd977 100644 --- a/config/locales/server.el.yml +++ b/config/locales/server.el.yml @@ -2741,8 +2741,6 @@ el: error: "Σφάλμα!" email_input: "Email διαχειριστή" submit_button: "Αποστολή Email" - discourse_hub: - access_token_problem: "Πες σε ένα διαχειριστή: Παρακαλώ ανανεώστε τις ρυθμίσεις ιστοτόπου για να συμπερι΄λάβετε το σωστό discourse_org_access_key." performance_report: initial_post_raw: Αυτό το θέμα περιλαμβάνει καθημερινές αναφορές απόδοσης για τη σελίδα σας. initial_topic_title: Εκθέσεις απόδοσης ιστοσελίδας diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 8b851a1c770..0359eb49fad 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -3340,9 +3340,6 @@ en: email_input: "Admin Email" submit_button: "Send Email" - discourse_hub: - access_token_problem: "Tell an admin: Please update the site settings to include the correct discourse_org_access_key." - performance_report: initial_post_raw: This topic includes daily performance reports for your site. initial_topic_title: Website performance reports diff --git a/config/locales/server.es.yml b/config/locales/server.es.yml index 26005e77ba3..9d0bdd1c282 100644 --- a/config/locales/server.es.yml +++ b/config/locales/server.es.yml @@ -2898,8 +2898,6 @@ es: error: "¡Error!" email_input: "Email de admin" submit_button: "Enviar email" - discourse_hub: - access_token_problem: "Avisa a un admin: Por favor actualiza los ajustes del sitio para incluir la discourse_org_access_key correctamente." performance_report: initial_post_raw: Este tema contiene informes diarios sobre el rendimiento de tu sito. initial_topic_title: Informe sobre el rendimiento del sitio diff --git a/config/locales/server.fa_IR.yml b/config/locales/server.fa_IR.yml index 610ac8d0d61..5cc9dc83d15 100644 --- a/config/locales/server.fa_IR.yml +++ b/config/locales/server.fa_IR.yml @@ -1115,8 +1115,6 @@ fa_IR: error: "خطا!" email_input: "ایمیل مدیر " submit_button: "ارسال ایمیل " - discourse_hub: - access_token_problem: "به یکی از مدیران بگویید: لطفا تنظیمات سایت را به‌روزرسانی نمایید تا شامل discourse_org_access_key صحیح باشد." performance_report: initial_post_raw: این مطلب شامل گزارش عملکرد روزانه سایت شماست. initial_topic_title: گزارش عملکرد وب‌سایت diff --git a/config/locales/server.fi.yml b/config/locales/server.fi.yml index 411d7d6e32e..20e6446f3db 100644 --- a/config/locales/server.fi.yml +++ b/config/locales/server.fi.yml @@ -2847,8 +2847,6 @@ fi: error: "Virhe!" email_input: "Ylläpitäjän sähköpostiosoite" submit_button: "Lähetä sähköposti" - discourse_hub: - access_token_problem: "Kerro ylläpitäjälle: päivitä toimiva discourse_org_access_key." performance_report: initial_post_raw: Tämä ketju sisältää päivittäisiä suorituskykyrapotteja sivustoltasi initial_topic_title: Sivuston suorituskykyraportit diff --git a/config/locales/server.fr.yml b/config/locales/server.fr.yml index 5416153d2c0..cdc249cde3f 100644 --- a/config/locales/server.fr.yml +++ b/config/locales/server.fr.yml @@ -2411,8 +2411,6 @@ fr: error: "Erreur !" email_input: "Courriel de l'administrateur" submit_button: "Envoyer un courriel" - discourse_hub: - access_token_problem: "En informer un administrateur : Veuillez mettre à jour les paramètres du site afin de renseigner une clé discourse_org_access_key correcte." performance_report: initial_post_raw: Ce sujet comprend des rapports de performance journaliers concernant votre site. initial_topic_title: Rapports de performances du site diff --git a/config/locales/server.he.yml b/config/locales/server.he.yml index f0d699d34ef..2dbfd96d92f 100644 --- a/config/locales/server.he.yml +++ b/config/locales/server.he.yml @@ -2891,8 +2891,6 @@ he: error: "שגיאה!" email_input: "מייל של המנהל" submit_button: "שלח מייל" - discourse_hub: - access_token_problem: "תגיד לאדמין שיעדכן את הגדרות האתר שיכללו את המזהה discourse_org_access_key הנכון." performance_report: initial_post_raw: 'נושא זה כולל דוחות פעילות יומיים עבור האתר שלך. ' initial_topic_title: דוחות פעילות לאתר diff --git a/config/locales/server.ja.yml b/config/locales/server.ja.yml index 71969ce4c78..784e6366005 100644 --- a/config/locales/server.ja.yml +++ b/config/locales/server.ja.yml @@ -1196,8 +1196,6 @@ ja: error: "エラー!" email_input: "アドミンメール" submit_button: "メールを送信する" - discourse_hub: - access_token_problem: "管理者に通知: サイト設定を更新して正しい discourse_org_access_key を設定してください。" performance_report: initial_post_raw: このトピックでは、あなたのサイトの毎日のパフォーマンスレポートが含まれています。 initial_topic_title: ウェブサイトパフォーマンスレポート diff --git a/config/locales/server.ko.yml b/config/locales/server.ko.yml index 15edab89dcf..6170536a5e5 100644 --- a/config/locales/server.ko.yml +++ b/config/locales/server.ko.yml @@ -1060,8 +1060,6 @@ ko: error: "에러!" email_input: "관리자 이메일" submit_button: "이메일 보내기" - discourse_hub: - access_token_problem: "관리자에게 말하기: 제발 웹사이트 설정 업데이트해서 맞는 discourse_org_access_key를 포함하게 해주세요." performance_report: initial_post_raw: 이 글타래는 웹사이트의 일일 성능 보고를 포함하고 있습니다. initial_topic_title: 웹사이트 성능 보고 diff --git a/config/locales/server.nl.yml b/config/locales/server.nl.yml index 9ae06602a25..a8d5ebbe40d 100644 --- a/config/locales/server.nl.yml +++ b/config/locales/server.nl.yml @@ -1604,8 +1604,6 @@ nl: error: "Fout!" email_input: "E-mailadres van beheerder" submit_button: "E-mail versturen" - discourse_hub: - access_token_problem: "Licht een admin in: Gelieve de site instellingen bijwerken met de juiste discourse_org_access_key." performance_report: initial_post_raw: Dit topic bevat dagelijkse prestatierapporten voor uw website. initial_topic_title: Performancerapportages van de website diff --git a/config/locales/server.pl_PL.yml b/config/locales/server.pl_PL.yml index 856eca80747..519492c6a29 100644 --- a/config/locales/server.pl_PL.yml +++ b/config/locales/server.pl_PL.yml @@ -2054,8 +2054,6 @@ pl_PL: error: "Błąd!" email_input: "Email administratora. " submit_button: "Wyślij Email. " - discourse_hub: - access_token_problem: "Powiedz administratorowi tej witryny: Zaktualizuj na poprawne ustawienia discourse_org_access_key." performance_report: initial_post_raw: 'Ten temat zawiera codzienne raporty wydajności dla twojej witryny. ' initial_topic_title: 'Testy wydajności witryny. ' diff --git a/config/locales/server.pt.yml b/config/locales/server.pt.yml index 3e589073cad..7ce4e6e6869 100644 --- a/config/locales/server.pt.yml +++ b/config/locales/server.pt.yml @@ -2408,8 +2408,6 @@ pt: error: "Erro!" email_input: "Email Administração" submit_button: "Enviar Email" - discourse_hub: - access_token_problem: "Dizer a um administrador: Por favor atualize as configurações do sítio para incluir a discourse_org_access_key correta." performance_report: initial_post_raw: Este tópico inclui relatórios diários de desempenho para o seu sítio. initial_topic_title: Relatórios de desempenho do sítio diff --git a/config/locales/server.pt_BR.yml b/config/locales/server.pt_BR.yml index 283d4883a1b..c7703b7e264 100644 --- a/config/locales/server.pt_BR.yml +++ b/config/locales/server.pt_BR.yml @@ -1728,8 +1728,6 @@ pt_BR: error: "Erro!" email_input: "Email do Administrador" submit_button: "Enviar Email" - discourse_hub: - access_token_problem: "Diga para um administrador: Por favor atualize as configurações do site para incluir a correta discourse_org_access_key." performance_report: initial_post_raw: Este tópico inclui relatórios de performance diários de seu site. initial_topic_title: Relatórios de performance do Site diff --git a/config/locales/server.ro.yml b/config/locales/server.ro.yml index 96642b7b300..be9d143d209 100644 --- a/config/locales/server.ro.yml +++ b/config/locales/server.ro.yml @@ -2500,8 +2500,6 @@ ro: error: "Eroare!" email_input: "Email Admin" submit_button: "Trimite email" - discourse_hub: - access_token_problem: "Spune-i unui admin: Te rog actualizează setările site-ului pentru a include discourse_org_access_key ." performance_report: initial_post_raw: Acest subiect include rapoarte zilnice de performanță referitoare la site-ul tău. initial_topic_title: Rapoarte de performanță website diff --git a/config/locales/server.ru.yml b/config/locales/server.ru.yml index 6219c616f89..b92f13b7a34 100644 --- a/config/locales/server.ru.yml +++ b/config/locales/server.ru.yml @@ -1653,8 +1653,6 @@ ru: error: "Ошибка!" email_input: "Email Администратора" submit_button: "отправить письмо" - discourse_hub: - access_token_problem: "Пожалуйста, обновите настройки сайта, чтобы задать верный discourse_org_access_key." performance_report: initial_post_raw: Эта тема содержит ежедневные отчеты активности форума. initial_topic_title: Отчеты активности форума diff --git a/config/locales/server.sk.yml b/config/locales/server.sk.yml index 69b1ed8750b..67dcb71a766 100644 --- a/config/locales/server.sk.yml +++ b/config/locales/server.sk.yml @@ -1418,8 +1418,6 @@ sk: error: "Chyba !" email_input: "Email administrátora" submit_button: "Poslať email" - discourse_hub: - access_token_problem: "Povedzte administrátorovi: Prosím aktualizujte nastavenia stránky, aby obsahovali správny discourse_org_access_key." performance_report: initial_post_raw: Táto téma obsahuje denné reporty rýchlosti Vašich stránok. initial_topic_title: Reporty rýchlosti stránok diff --git a/config/locales/server.sq.yml b/config/locales/server.sq.yml index 339010a3446..115feb6c724 100644 --- a/config/locales/server.sq.yml +++ b/config/locales/server.sq.yml @@ -1623,8 +1623,6 @@ sq: error: "Error!" email_input: "Admin Email" submit_button: "Dërgo Email" - discourse_hub: - access_token_problem: "Tell an admin: Please update the site settings to include the correct discourse_org_access_key." performance_report: initial_post_raw: This topic includes daily performance reports for your site. initial_topic_title: Raportet e performancës se faqes diff --git a/config/locales/server.sv.yml b/config/locales/server.sv.yml index e192c2047ca..cd01ad1be57 100644 --- a/config/locales/server.sv.yml +++ b/config/locales/server.sv.yml @@ -2154,8 +2154,6 @@ sv: error: "Fel!" email_input: "E-post till administratör" submit_button: "Skicka e-post" - discourse_hub: - access_token_problem: "Berätta för en administratör: Var vänlig och uppdatera webbplatsinställningarna för att inkludera den korrekta discourse_org_access_key." performance_report: initial_post_raw: Det här ämnet innehåller dagliga prestandarapporter för din webbplats. initial_topic_title: Prestandarapporter för webbplatsen diff --git a/config/locales/server.tr_TR.yml b/config/locales/server.tr_TR.yml index 6ea92de5722..5675750ceb9 100644 --- a/config/locales/server.tr_TR.yml +++ b/config/locales/server.tr_TR.yml @@ -1793,8 +1793,6 @@ tr_TR: error: "Hata!" email_input: "Yönetici e-postası" submit_button: "E-posta Gönder" - discourse_hub: - access_token_problem: "Admin'e iletin: Lütfen doğru discourse_org_access_key içerecek şekilde site ayarlarını güncelleyin." performance_report: initial_post_raw: Bu konu siteniz hakkında günlük performans raporlarını içerir. initial_topic_title: Site performansı raporları diff --git a/config/locales/server.vi.yml b/config/locales/server.vi.yml index e7eb9ef580b..a5ac553f642 100644 --- a/config/locales/server.vi.yml +++ b/config/locales/server.vi.yml @@ -1605,8 +1605,6 @@ vi: error: "Lỗi!" email_input: "Email quản trị" submit_button: "Gửi email" - discourse_hub: - access_token_problem: "Dành cho admin: Hãy cập nhật đúng discourse_org_access_key trong thiết lập website." performance_report: initial_post_raw: Chủ đề này bao gồm các báo cáo hiệu suất hàng ngày của website. initial_topic_title: Báo cáo hiệu suất website diff --git a/config/locales/server.zh_CN.yml b/config/locales/server.zh_CN.yml index 21219b2cbe1..6f874e45ad8 100644 --- a/config/locales/server.zh_CN.yml +++ b/config/locales/server.zh_CN.yml @@ -2475,8 +2475,6 @@ zh_CN: error: "错误!" email_input: "管理员邮件" submit_button: "发送邮件" - discourse_hub: - access_token_problem: "告诉管理员:请更新站点设置,应使用正确的 discourse_org_access_key。" performance_report: initial_post_raw: 这个主题将用来展示网站每日性能报告。 initial_topic_title: 网站性能报告 diff --git a/config/locales/server.zh_TW.yml b/config/locales/server.zh_TW.yml index 5fb8cca8caf..c386271b821 100644 --- a/config/locales/server.zh_TW.yml +++ b/config/locales/server.zh_TW.yml @@ -2597,8 +2597,6 @@ zh_TW: error: "錯誤" email_input: "管理者郵件" submit_button: "送出電子郵件" - discourse_hub: - access_token_problem: "告訴管理員:請更新站點設置,應使用正確的 discourse_org_access_key。" performance_report: initial_post_raw: 這個主題將用來展示網站每日性能報告。 initial_topic_title: 網站效能報表 diff --git a/config/site_settings.yml b/config/site_settings.yml index a026a77fb65..9f37c9f832a 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -356,12 +356,6 @@ users: min: 1 max: 10 block_common_passwords: true - enforce_global_nicknames: - default: false - hidden: true - discourse_org_access_key: - default: '' - hidden: true username_change_period: 3 email_editable: true logout_redirect: diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index b44d22d627c..522a478c2fe 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -746,17 +746,14 @@ describe UsersController do end context 'when an Exception is raised' do - [ ActiveRecord::StatementInvalid, - RestClient::Forbidden ].each do |exception| - before { User.any_instance.stubs(:save).raises(exception) } + before { User.any_instance.stubs(:save).raises(ActiveRecord::StatementInvalid.new('Oh no')) } - let(:create_params) { - { name: @user.name, username: @user.username, - password: "strongpassword", email: @user.email} - } + let(:create_params) { + { name: @user.name, username: @user.username, + password: "strongpassword", email: @user.email} + } - include_examples 'failed signup' - end + include_examples 'failed signup' end context "with custom fields" do