diff --git a/app/controllers/admin/confirmations_controller.rb b/app/controllers/admin/confirmations_controller.rb index 34dfb458ec8866a2839b76bffa1bb7997e83a107..8d3477e660256c58e39f60f31f4cb0544d3b9c2a 100644 --- a/app/controllers/admin/confirmations_controller.rb +++ b/app/controllers/admin/confirmations_controller.rb @@ -3,6 +3,7 @@ module Admin class ConfirmationsController < BaseController before_action :set_user + before_action :check_confirmation, only: [:resend] def create authorize @user, :confirm? @@ -11,10 +12,28 @@ module Admin redirect_to admin_accounts_path end + def resend + authorize @user, :confirm? + + @user.resend_confirmation_instructions + + log_action :confirm, @user + + flash[:notice] = I18n.t('admin.accounts.resend_confirmation.success') + redirect_to admin_accounts_path + end + private def set_user @user = Account.find(params[:account_id]).user || raise(ActiveRecord::RecordNotFound) end + + def check_confirmation + if @user.confirmed? + flash[:error] = I18n.t('admin.accounts.resend_confirmation.already_confirmed') + redirect_to admin_accounts_path + end + end end end diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml index 2e6de18643d259d20003a3f529b9ba2106d45d0e..ed8190af5af34ec50c4ce24cffbf79a01fbd8eb0 100644 --- a/app/views/admin/accounts/show.html.haml +++ b/app/views/admin/accounts/show.html.haml @@ -36,13 +36,19 @@ %th= t('admin.accounts.email') %td = @account.user_email - - if @account.user_confirmed? - = fa_icon('check') = table_link_to 'edit', t('admin.accounts.change_email.label'), admin_account_change_email_path(@account.id) if can?(:change_email, @account.user) - if @account.user_unconfirmed_email.present? %th= t('admin.accounts.unconfirmed_email') %td = @account.user_unconfirmed_email + %tr + %th= t('admin.accounts.email_status') + %td + - if @account.user&.confirmed? + = t('admin.accounts.confirmed') + - else + = t('admin.accounts.confirming') + = table_link_to 'refresh', t('admin.accounts.resend_confirmation.send'), resend_admin_account_confirmation_path(@account.id), method: :post if can?(:confirm, @account.user) %tr %th= t('admin.accounts.login_status') %td diff --git a/config/locales/ar.yml b/config/locales/ar.yml index a5179ae148e436105ae469deceb919b2f9c146f5..eb0127eb511f6d9cd287be85f065d0706a65b5f6 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -61,6 +61,7 @@ ar: by_domain: النطاق confirm: تأكيد confirmed: مؤكَّد + confirming: التأكد demote: إنزال الرÙتبة الوظيÙية disable: تعطيل disable_two_factor_authentication: تعطيل 2FA @@ -69,6 +70,7 @@ ar: domain: النطاق edit: تعديل email: البريد الإلكتروني + email_status: Øالة البريد الإلكتروني enable: تÙعيل enabled: Ù…Ùعَّل feed_url: عنوان رابط التغذية @@ -106,6 +108,10 @@ ar: public: عمومي push_subscription_expires: انتهاء الاشتراك â€PuSH“ redownload: تØديث الصورة الرمزية + resend_confirmation: + already_confirmed: هذا المستخدم مؤكد بالÙعل + send: أعد إرسال رسالة البريد الالكتروني الخاصة بالتأكيد + success: تم إرسال رسالة التأكيد بنجاØ! reset: إعادة التعيين reset_password: إعادة ضبط كلمة السر resubscribe: اشترك مرة أخرى diff --git a/config/locales/ca.yml b/config/locales/ca.yml index a8c75c32dfab6da75bcdb1be0cc201aaf3c21151..bdc3f74844d32df73ffb64489c1161b1c76a65c0 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -70,6 +70,7 @@ ca: title: Canviar adreça de correu de %{username} confirm: Confirma confirmed: Confirmat + confirming: Confirmando demote: Degrada disable: Inhabilita disable_two_factor_authentication: Desactiva 2FA @@ -78,6 +79,7 @@ ca: domain: Domini edit: Edita email: Correu electrònic + email_status: Estado del correo electrónico enable: Habilita enabled: Habilitat feed_url: URL del canal @@ -116,6 +118,10 @@ ca: push_subscription_expires: La subscripció PuSH expira redownload: Actualitza l'avatar remove_avatar: Eliminar avatar + resend_confirmation: + already_confirmed: Este usuario ya está confirmado + send: Reenviar el correo electrónico de confirmación + success: "¡Correo electrónico de confirmación enviado con éxito!" reset: Reinicialitza reset_password: Restableix la contrasenya resubscribe: Torna a subscriure diff --git a/config/locales/de.yml b/config/locales/de.yml index aa4295c896923814ef7b07d8292aac938cbf98f8..05d7e01b389fc59df9444b9ea07f4214315298bf 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -70,6 +70,7 @@ de: title: E-Mail-Adresse für %{username} ändern confirm: Bestätigen confirmed: Bestätigt + confirming: Bestätigung demote: Degradieren disable: Ausschalten disable_two_factor_authentication: 2FA abschalten @@ -78,6 +79,7 @@ de: domain: Domain edit: Bearbeiten email: E-Mail + email_status: E-Mail-Status enable: Freischalten enabled: Freigegeben feed_url: Feed-URL @@ -116,6 +118,10 @@ de: push_subscription_expires: PuSH-Abonnement läuft aus redownload: Avatar neu laden remove_avatar: Profilbild entfernen + resend_confirmation: + already_confirmed: Dieser Benutzer wurde bereits bestätigt + send: Bestätigungsmail erneut senden + success: Bestätigungs-E-Mail erfolgreich gesendet! reset: Zurücksetzen reset_password: Passwort zurücksetzen resubscribe: Wieder abonnieren diff --git a/config/locales/en.yml b/config/locales/en.yml index 4f967f9ac4ab060fc2f65b1146ae37786ddfbee4..e18354eac49885c7320ba8dd96cb7bf7219b3b5f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -70,6 +70,7 @@ en: title: Change Email for %{username} confirm: Confirm confirmed: Confirmed + confirming: Confirming demote: Demote disable: Disable disable_two_factor_authentication: Disable 2FA @@ -78,6 +79,7 @@ en: domain: Domain edit: Edit email: E-mail + email_status: E-mail Status enable: Enable enabled: Enabled feed_url: Feed URL @@ -116,6 +118,10 @@ en: push_subscription_expires: PuSH subscription expires redownload: Refresh avatar remove_avatar: Remove avatar + resend_confirmation: + already_confirmed: This user is already confirmed + send: Resend confirmation email + success: Confirmation email successfully sent! reset: Reset reset_password: Reset password resubscribe: Resubscribe diff --git a/config/locales/eo.yml b/config/locales/eo.yml index 9c44d0e6226ed1c2f2661b562f0d3b6406bbff49..47d591993b15bd30e396c4069c062a947d9f513f 100644 --- a/config/locales/eo.yml +++ b/config/locales/eo.yml @@ -61,6 +61,7 @@ eo: by_domain: Domajno confirm: Konfirmi confirmed: Konfirmita + confirming: Konfirmante demote: Degradi disable: Malebligi disable_two_factor_authentication: Malebligi 2FA @@ -69,6 +70,7 @@ eo: domain: Domajno edit: Redakti email: RetpoÅto + email_status: RetpoÅto Stato enable: Ebligi enabled: Ebligita feed_url: URL de la fluo @@ -106,6 +108,10 @@ eo: public: Publika push_subscription_expires: EksvalidiÄo de la abono al PuSH redownload: Aktualigi profilbildon + resend_confirmation: + already_confirmed: Ĉi tiu uzanto jam estas konfirmita + send: Esend konfirmi retpoÅton + success: Konfirma retpoÅto sukcese sendis reset: Restarigi reset_password: Restarigi pasvorton resubscribe: Reaboni diff --git a/config/locales/es.yml b/config/locales/es.yml index be7dcd81e56de5d5f737b0af0aa4c88c29ac7328..11bee3239b3822bcf775ffec4f3b686f608c2f80 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -70,6 +70,7 @@ es: title: Cambiar el correo electrónico de %{username} confirm: Confirmar confirmed: Confirmado + confirming: Confirmando demote: Degradar disable: Deshabilitar disable_two_factor_authentication: Desactivar autenticación de dos factores @@ -78,6 +79,7 @@ es: domain: Dominio edit: Editar email: E-mail + email_status: E-mail Status enable: Habilitar enabled: Habilitada feed_url: URL de notificaciones @@ -116,6 +118,10 @@ es: push_subscription_expires: Expiración de la suscripción PuSH redownload: Refrescar avatar remove_avatar: Eliminar el avatar + resend_confirmation: + already_confirmed: Este usuario ya está confirmado + send: Reenviar el correo electrónico de confirmación + success: "¡Correo electrónico de confirmación enviado con éxito" reset: Reiniciar reset_password: Reiniciar contraseña resubscribe: Re-suscribir diff --git a/config/locales/fa.yml b/config/locales/fa.yml index 3aa40f0b3e87922d549791a394a462f3ab645823..5255e0e38fd5a23f194e072226a25e1cbc351e83 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -61,6 +61,7 @@ fa: by_domain: دامین confirm: تأیید confirmed: تأیید شد + confirming: تأیید demote: تنزل‌دادن disable: غیرÙعال disable_two_factor_authentication: غیرÙعال‌سازی ورود دومرØله‌ای @@ -69,6 +70,7 @@ fa: domain: دامین edit: ویرایش email: ایمیل + email_status: وضعیت ایمیل enable: Ùعال enabled: Ùعال feed_url: نشانی Ùید @@ -106,6 +108,10 @@ fa: public: عمومی push_subscription_expires: عضویت از راه PuSH منقضی شد redownload: به‌روزرسانی تصویر نمایه + resend_confirmation: + already_confirmed: این کاربر قبلا تایید شده است + send: ایمیل تایید را دوباره بÙرستید + success: ایمیل تایید با موÙقیت ارسال شد reset: بازنشانی reset_password: بازنشانی رمز resubscribe: اشتراک دوباره diff --git a/config/locales/fi.yml b/config/locales/fi.yml index b313c87236d4829ba26c7bf7ec1ff536a01f3def..fca58cc0f1c107885908c92af20c093f58361c0d 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -61,6 +61,7 @@ fi: by_domain: Verkko-osoite confirm: Vahvista confirmed: Vahvistettu + confirming: Vahvistavat demote: Alenna disable: Poista käytöstä disable_two_factor_authentication: Poista 2FA käytöstä @@ -69,6 +70,7 @@ fi: domain: Verkko-osoite edit: Muokkaa email: Sähköposti + email_status: Sähköpostin tila enable: Ota käyttöön enabled: Käytössä feed_url: Syötteen URL @@ -106,6 +108,10 @@ fi: public: Julkinen push_subscription_expires: PuSH-tilaus vanhenee redownload: Päivitä profiilikuva + resend_confirmation: + already_confirmed: Tämä käyttäjä on jo vahvistettu + send: Lähetä varmistusviesti uudelleen + success: Vahvistusviesti lähetettiin onnistuneesti reset: Palauta reset_password: Palauta salasana resubscribe: Tilaa uudelleen diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 3b543fdb7b098fdf7923869f336186d2c58d1fb7..e7142f3fdbf59f2aeec3f65a28f30b0e014836a5 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -70,6 +70,7 @@ fr: title: Modifier le courriel pour %{username} confirm: Confirmer confirmed: Confirmé + confirming: Confirmant demote: Rétrograder disable: Désactiver disable_two_factor_authentication: Désactiver l’authentification à deux facteurs @@ -78,6 +79,7 @@ fr: domain: Domaine edit: Éditer email: Courriel + email_status: État de la messagerie enable: Activer enabled: Activé feed_url: URL du flux @@ -116,6 +118,10 @@ fr: push_subscription_expires: Expiration de l’abonnement PuSH redownload: Rafraîchir les avatars remove_avatar: Supprimer l'avatar + resend_confirmation: + already_confirmed: Cet utilisateur est déjà confirmé + send: Renvoyer un courriel de confirmation + success: Email de confirmation envoyé avec succès ! reset: Réinitialiser reset_password: Réinitialiser le mot de passe resubscribe: Se réabonner diff --git a/config/locales/gl.yml b/config/locales/gl.yml index eec1b4e1efae6da9d0b77ce895f223a6b22c1632..e00c4b4333456cdf80b334db7ed31b9ed4cd4514 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -70,6 +70,7 @@ gl: title: Cambiar o correo-e de %{username} confirm: Confirmar confirmed: Confirmado + confirming: Confirmar demote: Degradar disable: Deshabilitar disable_two_factor_authentication: Deshabilitar 2FA @@ -78,6 +79,7 @@ gl: domain: Dominio edit: Editar email: E-mail + email_status: Estado del correo electrónico enable: Habilitar enabled: Habilitado feed_url: URL fonte @@ -116,6 +118,10 @@ gl: push_subscription_expires: A suscrición PuSH caduca redownload: Actualizar avatar remove_avatar: Eliminar avatar + resend_confirmation: + already_confirmed: Este usuario ya está confirmado + send: Reenviar el correo electrónico de confirmación + success: "¡Correo electrónico de confirmación enviado con éxito!" reset: Restablecer reset_password: Restablecer contrasinal resubscribe: Voltar a suscribir diff --git a/config/locales/he.yml b/config/locales/he.yml index d66d9f03463c6f75b827e5f0c509be6a07e5c75d..c127db38528d58beb4e4fc424986aa6a414d1dc2 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -61,6 +61,7 @@ he: by_domain: ×©× ×ž×ª×—× confirm: ×ישור confirmed: ×ושר + confirming: המ×שר demote: הורדה בדרגה disable: ×œ×—×¡×•× disable_two_factor_authentication: ביטול הזדהות דו-שלבית @@ -69,6 +70,7 @@ he: domain: ×ª×—×•× edit: עריכה email: דו×"ל + email_status: סטטוס דו×"ל enable: ל×פשר enabled: מ×ופשר feed_url: כתובת פיד @@ -106,6 +108,10 @@ he: public: פומבי push_subscription_expires: הרשמה להודעות בדחיפה פגה redownload: לקרי××” מחדש של ×”×ווט×ר + resend_confirmation: + already_confirmed: משתמש ×–×” כבר ×ושר + send: שלח מחדש דו×"ל ×ימות + success: הודעת ×”×ימייל × ×©×œ×—×” בהצלחה! reset: ×יפוס reset_password: ×תחול ×¡×™×¡×ž× resubscribe: ×œ×”×¨×©× ×ž×—×“×© diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 422c0595594b66a8efe84453f0f28445e9119ad7..0cd0021c161cc2a7935e027460bcddc8e0ca9f40 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -61,6 +61,7 @@ hu: by_domain: Domain confirm: MegerÅ‘sÃtés confirmed: MegerÅ‘sÃtve + confirming: MegerÅ‘sÃtve demote: Lefokozás disable: Kikapcsolás disable_two_factor_authentication: KétlépcsÅ‘s azonosÃtás kikapcsolása @@ -69,6 +70,7 @@ hu: domain: Domain edit: Szerkesztés email: E-mail + email_status: E-mail állapot enable: Engedélyezés enabled: Engedélyezve feed_url: HÃrcsatorna URL @@ -106,6 +108,10 @@ hu: public: Nyilvános push_subscription_expires: A PuSH feliratkozás elévül redownload: Profilkép frissÃtése + resend_confirmation: + already_confirmed: Ezt a felhasználót már megerÅ‘sÃtették + send: Küldd újra a megerÅ‘sÃtÅ‘ email-t + success: A megerÅ‘sÃtÅ‘ e-mail sikeresen elküldve! reset: VisszaállÃtás reset_password: Jelszó visszaállÃtása resubscribe: Feliratkozás ismét diff --git a/config/locales/id.yml b/config/locales/id.yml index 0476e2848e471efff37cec32f093cd6fd80c8030..4fb75f2b0e5fa56f1d3262d30192337693049983 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -29,10 +29,12 @@ id: are_you_sure: Anda yakin? confirm: Konfirmasi confirmed: Dikonfirmasi + confirming: Mengkonfirmasi display_name: Nama domain: Domain edit: Ubah email: E-mail + email_status: Status Email feed_url: URL Feed followers: Pengikut follows: Mengikut @@ -58,6 +60,10 @@ id: profile_url: URL profil public: Publik push_subscription_expires: Langganan PuSH telah kadaluarsa + resend_confirmation: + already_confirmed: Pengguna ini sudah dikonfirmasi + send: Kirim ulang email konfirmasi + success: Email konfirmasi berhasil dikirim! reset_password: Reset kata sandi salmon_url: URL Salmon show: diff --git a/config/locales/it.yml b/config/locales/it.yml index c1ac176c45d803cafdd8d64a25ac33483ac9b158..eafe6b2a17950709f7c44afdfdf700934cfd3915 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -66,6 +66,7 @@ it: title: Cambia email per %{username} confirm: Conferma confirmed: Confermato + confirming: Confermando demote: Declassa disable: Disabilita disable_two_factor_authentication: Disabilita 2FA @@ -74,6 +75,7 @@ it: domain: Dominio edit: Modifica email: Email + email_status: Stato email enable: Abilita enabled: Abilitato feed_url: URL Feed @@ -111,6 +113,10 @@ it: public: Pubblico redownload: Aggiorna avatar remove_avatar: Rimuovi avatar + resend_confirmation: + already_confirmed: Questo utente è già confermato + send: Reinvia email di conferma + success: Email di conferma inviata con successo! reset: Reimposta reset_password: Reimposta password resubscribe: Riscriversi diff --git a/config/locales/ja.yml b/config/locales/ja.yml index bc48613b98d1674c25c6f73e34f5ebe08a4d6f3f..c7025fc18671115d961dc621a07e82c8c9566cf5 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -70,6 +70,7 @@ ja: title: "%{username} ã•ã‚“ã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’変更" confirm: ç¢ºèª confirmed: 確èªæ¸ˆã¿ + confirming: 確èªä¸ demote: é™æ ¼ disable: 無効化 disable_two_factor_authentication: 二段階èªè¨¼ã‚’無効ã«ã™ã‚‹ @@ -78,6 +79,7 @@ ja: domain: ドメイン edit: 編集 email: メールアドレス + email_status: メールアドレスã®çŠ¶æ…‹ enable: 有効化 enabled: 有効 feed_url: フィードURL @@ -116,6 +118,10 @@ ja: push_subscription_expires: PuSHè³¼èªæœŸé™ redownload: ã‚¢ãƒã‚¿ãƒ¼ã®æ›´æ–° remove_avatar: アイコンを削除 + resend_confirmation: + already_confirmed: メールアドレスã¯ç¢ºèªæ¸ˆã¿ã§ã™ã€‚ + send: 確èªãƒ¡ãƒ¼ãƒ«ã‚’å†é€ + success: 確èªãƒ¡ãƒ¼ãƒ«ã‚’å†é€ä¿¡ã—ã¾ã—ãŸ! reset: リセット reset_password: パスワードå†è¨å®š resubscribe: å†è¬›èª diff --git a/config/locales/ko.yml b/config/locales/ko.yml index bd6717d497a641dc9a0d5985afd2cc5b45e76440..92e99ce50140e2b4a92616ca6d070ebd4fa225cc 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -70,6 +70,7 @@ ko: title: "%{username}ì˜ ì´ë©”ì¼ ì£¼ì†Œ 변경" confirm: í™•ì¸ confirmed: 확ì¸ë¨ + confirming: í™•ì¸ ì¤‘ demote: 모ë”ë ˆì´í„° 강등 disable: 비활성화 disable_two_factor_authentication: 2단계 ì¸ì¦ì„ 비활성화 @@ -78,6 +79,7 @@ ko: domain: ë„ë©”ì¸ edit: 편집 email: E-mail + email_status: ì´ë©”ì¼ ìƒíƒœ enable: 활성화 enabled: í™œì„±í™”ëœ feed_url: 피드 URL @@ -116,6 +118,10 @@ ko: push_subscription_expires: PuSH êµ¬ë… ê¸°ê°„ 만료 redownload: 아바타 ì—…ë°ì´íŠ¸ remove_avatar: 아바타 지우기 + resend_confirmation: + already_confirmed: ì´ ì‚¬ìš©ìžëŠ” ì´ë¯¸ 확ì¸ë˜ì—ˆìŠµë‹ˆë‹¤. + send: 다시 í™•ì¸ ì´ë©”ì¼ + success: í™•ì¸ ì´ë©”ì¼ì´ ì „ì†¡ë˜ì—ˆìŠµë‹ˆë‹¤. reset: 초기화 reset_password: 비밀번호 초기화 resubscribe: 다시 êµ¬ë… diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 00f21babd0b282e55782984319a76933a749c966..6ca81b37579f8f92302c74b209f8ac989fc9d2d1 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -70,6 +70,7 @@ nl: title: E-mailadres veranderen voor %{username} confirm: Bevestigen confirmed: Bevestigd + confirming: Bevestiging demote: Degraderen disable: Uitschakelen disable_two_factor_authentication: 2FA uitschakelen @@ -78,6 +79,7 @@ nl: domain: Domein edit: Bewerken email: E-mail + email_status: E-mail Status enable: Inschakelen enabled: Ingeschakeld feed_url: Feed-URL @@ -116,6 +118,10 @@ nl: push_subscription_expires: PuSH-abonnement verloopt op redownload: Avatar vernieuwen remove_avatar: Avatar verwijderen + resend_confirmation: + already_confirmed: Deze gebruiker is al bevestigd + send: Verzend bevestigingsmail opnieuw + success: Bevestigingsmail succesvol verzonden! reset: Opnieuw reset_password: Wachtwoord opnieuw instellen resubscribe: Opnieuw abonneren diff --git a/config/locales/no.yml b/config/locales/no.yml index 6ce2c0f0137d17411e43394046a9fadb6a976b70..837042f851192563fbcbbb128fdd803743e2fb70 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -61,6 +61,7 @@ by_domain: Domene confirm: Bekreft confirmed: Bekreftet + confirming: Bekrefte demote: Degrader disable: Deaktiver disable_two_factor_authentication: Skru av 2FA @@ -69,6 +70,7 @@ domain: Domene edit: Redigér email: E-post + email_status: E-poststatus enable: Aktiver enabled: Aktivert feed_url: Feed-URL @@ -106,6 +108,10 @@ public: Offentlig push_subscription_expires: PuSH-abonnent utløper redownload: Oppdater avatar + resend_confirmation: + already_confirmed: Denne brukeren er allerede bekreftet + send: Send bekreftelses-epost pÃ¥ nytt + success: Bekreftelses e-post er vellykket sendt! reset: Tilbakestill reset_password: Nullstill passord resubscribe: Abonner pÃ¥ nytt diff --git a/config/locales/oc.yml b/config/locales/oc.yml index c11fe614b0d783a13fbfec0349026e531a5acbe0..e61f7ebd00c4b68f92ca484756ac051d199cad30 100644 --- a/config/locales/oc.yml +++ b/config/locales/oc.yml @@ -70,6 +70,7 @@ oc: title: Cambiar l’adreça a %{username} confirm: Confirmar confirmed: Confirmat + confirming: Confirmando demote: Retrogradar disable: Desactivar disable_two_factor_authentication: Desactivar 2FA @@ -78,6 +79,7 @@ oc: domain: Domeni edit: Modificar email: Corrièl + email_status: Estado del correo electrónico enable: Activar enabled: Activat feed_url: Flux URL @@ -116,6 +118,10 @@ oc: push_subscription_expires: Fin de l’abonament PuSH redownload: Actualizar los avatars remove_avatar: Supriir l’avatar + resend_confirmation: + already_confirmed: Este usuario ya está confirmado + send: Reenviar el correo electrónico de confirmación + success: "¡Correo electrónico de confirmación enviado con éxito!" reset: Reïnicializar reset_password: Reïnicializar lo senhal resubscribe: Se tornar abonar diff --git a/config/locales/pl.yml b/config/locales/pl.yml index bd38aa6f771730042d01df9fab41879d8ef70a90..1fbe0d5c8f848df0d50655a0e7709b70fcd6d123 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -70,6 +70,7 @@ pl: title: ZmieÅ„ adres e-mail dla %{username} confirm: Potwierdź confirmed: Potwierdzono + confirming: Potwierdzam demote: Degraduj disable: Dezaktywuj disable_two_factor_authentication: WyÅ‚Ä…cz uwierzytelnianie dwuetapowe @@ -78,6 +79,7 @@ pl: domain: Domena edit: Edytuj email: Adres e-mail + email_status: Status e-maila enable: Aktywuj enabled: Aktywowano feed_url: Adres kanaÅ‚u @@ -116,6 +118,10 @@ pl: push_subscription_expires: Subskrypcja PuSH wygasa redownload: OdÅ›wież awatar remove_avatar: Usun awatar + resend_confirmation: + already_confirmed: Ten użytkownik jest już potwierdzony + send: WyÅ›lij ponownie email potwierdzajÄ…cy + success: E-mail z potwierdzeniem zostaÅ‚ wysÅ‚any! reset: Resetuj reset_password: Resetuj hasÅ‚o resubscribe: Ponów subskrypcjÄ™ diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 862833d873c3025b5db3a46a3d9916e0ed5dfd37..37abeffd9f6e8d83df621712d55fb5bdafdf2993 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -70,6 +70,7 @@ pt-BR: title: Mudar e-mail para %{username} confirm: Confirmar confirmed: Confirmado + confirming: Confirmando demote: Rebaixar disable: Desativar disable_two_factor_authentication: Desativar 2FA @@ -78,6 +79,7 @@ pt-BR: domain: DomÃnio edit: Editar email: E-mail + email_status: Estado del correo electrónico enable: Ativar enabled: Ativado feed_url: URL do feed @@ -116,6 +118,10 @@ pt-BR: push_subscription_expires: Inscrição PuSH expira redownload: Atualizar avatar remove_avatar: Remover avatar + resend_confirmation: + already_confirmed: Este usuario ya está confirmado + send: Reenviar el correo electrónico de confirmación + success: "¡Correo electrónico de confirmación enviado con éxito!" reset: Anular reset_password: Modificar senha resubscribe: Reinscrever-se diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 62a7ef0ec4242a6db7a02377934ff5616c9d995e..7c10124ff6e75ccad414bc4d3d8daff641742fac 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -61,6 +61,7 @@ pt: by_domain: DomÃnio confirm: Confirme confirmed: Confirmado + confirming: Confirmer demote: Rebaixar disable: Desativar disable_two_factor_authentication: Desativar 2FA @@ -69,6 +70,7 @@ pt: domain: DomÃnio edit: Editar email: E-mail + email_status: État de la messagerie enable: Ativar enabled: Ativado feed_url: URL do Feed @@ -106,6 +108,10 @@ pt: public: Público push_subscription_expires: A Inscrição PuSH expira redownload: Atualizar avatar + resend_confirmation: + already_confirmed: Cet utilisateur est déjà confirmé + send: Renvoyer un courriel de confirmation + success: Email de confirmation envoyé avec succès! reset: Restaurar reset_password: Reset palavra-passe resubscribe: Reinscrever diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 603e1f3cabf739f1aa3c31eddc8eb125f3353c6c..99825a765a28c6ea353e211bdcdc0874dc7baa9e 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -61,6 +61,7 @@ ru: by_domain: Домен confirm: Подтвердить confirmed: Подтверждено + confirming: подтверждающий demote: Разжаловать disable: Отключить disable_two_factor_authentication: Отключить 2FA @@ -69,6 +70,7 @@ ru: domain: Домен edit: Изменить email: E-mail + email_status: Ð¡Ñ‚Ð°Ñ‚ÑƒÑ Ñлектронной почты enable: Включить enabled: Включен feed_url: URL фида @@ -106,6 +108,10 @@ ru: public: Публичный push_subscription_expires: ПодпиÑка PuSH иÑтекает redownload: Обновить аватар + resend_confirmation: + already_confirmed: Ðтот пользователь уже подтвержден + send: Повторно отправить подтверждение по Ñлектронной почте + success: ПиÑьмо Ñ Ð¿Ð¾Ð´Ñ‚Ð²ÐµÑ€Ð¶Ð´ÐµÐ½Ð¸ÐµÐ¼ уÑпешно отправлено! reset: СброÑить reset_password: СброÑить пароль resubscribe: ПереподпиÑатьÑÑ diff --git a/config/locales/sk.yml b/config/locales/sk.yml index 7fb097f03d87bc024548a1b8653a6501a2ad52f1..ef756b474e80bca8d729268e41cecf6611c8ffa5 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -70,6 +70,7 @@ sk: title: Zmeň email pre %{username} confirm: PotvrdiÅ¥ confirmed: Potvrdený + confirming: Potvrdzujúci demote: DegradovaÅ¥ disable: ZablokovaÅ¥ disable_two_factor_authentication: ZakázaÅ¥ 2FA @@ -78,6 +79,7 @@ sk: domain: Doména edit: UpraviÅ¥ email: Email + email_status: Stav Email enable: PovoliÅ¥ enabled: Povolený feed_url: URL Äasovej osi @@ -116,6 +118,10 @@ sk: push_subscription_expires: PuSH odoberanie expiruje redownload: ObnoviÅ¥ avatar remove_avatar: OdstrániÅ¥ avatár + resend_confirmation: + already_confirmed: Tento použÃvateľ už bol potvrdený + send: Znova odoslaÅ¥ potvrdzovacà e-mail + success: Potvrdený e-mail bol úspeÅ¡ne odoslaný! reset: Reset reset_password: ObnoviÅ¥ heslo resubscribe: Znovu odoberaÅ¥ diff --git a/config/locales/sr-Latn.yml b/config/locales/sr-Latn.yml index dba952917a72e2f67ae207d9c8ad2a01c2d1535e..0c7756c53ea0961a7754edfaf9a6255acf51299b 100644 --- a/config/locales/sr-Latn.yml +++ b/config/locales/sr-Latn.yml @@ -61,6 +61,7 @@ sr-Latn: by_domain: Domen confirm: Potvrdi confirmed: PotvrÄ‘eno + confirming: PotvrÄ‘ujući demote: Ražaluj disable: IskljuÄi disable_two_factor_authentication: IskljuÄi 2FA @@ -69,6 +70,7 @@ sr-Latn: domain: Domen edit: Izmeni email: E-poÅ¡ta + email_status: Status e-poÅ¡te enable: UkljuÄi enabled: UkljuÄeno feed_url: Adresa dovoda @@ -106,6 +108,10 @@ sr-Latn: public: Javno push_subscription_expires: PuSH subscription expires redownload: Osveži avatar + resend_confirmation: + already_confirmed: Ovaj korisnik je već potvrÄ‘en + send: Ponovo poÅ¡aljite e-poruku za potvrdu + success: E-mail potvrde je uspeÅ¡no poslat! reset: Resetuj reset_password: Resetuj lozinku resubscribe: Ponovo se pretplati diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 74abf0323ee709270f3d9af7b6343bb6e6d89ae2..1cb87ff30c857d36330ce4a1c89f13117d85e9d5 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -61,6 +61,7 @@ sr: by_domain: Домен confirm: Потврди confirmed: Потврђено + confirming: Потврдување demote: Ражалуј disable: ИÑкључи disable_two_factor_authentication: ИÑкључи 2FA @@ -69,6 +70,7 @@ sr: domain: Домен edit: Измени email: Е-пошта + email_status: Е-пошта ÑÑ‚Ð°Ñ‚ÑƒÑ enable: Укључи enabled: Укључено feed_url: ÐдреÑа довода @@ -106,6 +108,10 @@ sr: public: Јавно push_subscription_expires: PuSH subscription expires redownload: ОÑвежи аватар + resend_confirmation: + already_confirmed: Овој кориÑник е веќе потврден + send: Препрати го е-мајлот за потврда + success: Е-пошта за потврда уÑпешно иÑпратена! reset: РеÑетуј reset_password: РеÑетуј лозинку resubscribe: Поново Ñе претплати diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 9e0bb0856545a60054ea8acfaa5f09a15b938602..1b09656555ae11864bc8b79611138e5e24e5d333 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -70,6 +70,7 @@ sv: title: Byt E-postadress för %{username} confirm: Bekräfta confirmed: Bekräftad + confirming: Bekräftande demote: Degradera disable: inaktivera disable_two_factor_authentication: Inaktivera 2FA @@ -78,6 +79,7 @@ sv: domain: Domän edit: Redigera email: E-post + email_status: E-poststatus enable: Aktivera enabled: Aktiverad feed_url: Flödes URL @@ -116,6 +118,10 @@ sv: push_subscription_expires: PuSH-prenumerationen löper ut redownload: Uppdatera avatar remove_avatar: Ta bort avatar + resend_confirmation: + already_confirmed: Den här användaren är redan bekräftad + send: Skicka om e-postbekräftelse + success: Bekräftelsemeddelande skickas framgÃ¥ngsrikt! reset: Ã…terställ reset_password: Ã…terställ lösenord resubscribe: Starta en ny prenumeration diff --git a/config/locales/th.yml b/config/locales/th.yml index 9d93115b0d70f76928ae80d06918f107c7b75d7e..6804dbd13d3b071f4b5a4d0de0935edb4b5c261c 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -29,11 +29,13 @@ th: are_you_sure: à¹à¸™à¹ˆà¹ƒà¸ˆà¸™à¸°? confirm: ยืนยัน confirmed: ยึนยันà¹à¸¥à¹‰à¸§ + confirming: ยืนยัน disable_two_factor_authentication: Disable 2FA display_name: ชื่à¸à¸ªà¸³à¸«à¸£à¸±à¸šà¸”ีสเพล domain: โดà¹à¸¡à¸™ edit: à¹à¸à¹‰à¹„ข email: à¸à¸µà¹€à¸¡à¸¥à¹Œ + email_status: สถานะà¸à¸µà¹€à¸¡à¸¥ feed_url: Feed URL followers: ผู้ติดตาม follows: ติดตาม @@ -59,6 +61,10 @@ th: profile_url: Profile URL public: สาธารณะ push_subscription_expires: PuSH subscription expires + resend_confirmation: + already_confirmed: ผู้ใช้รายนี้ได้รับà¸à¸²à¸£à¸¢à¸·à¸™à¸¢à¸±à¸™à¹à¸¥à¹‰à¸§ + send: ส่งà¸à¸µà¹€à¸¡à¸¥à¸¢à¸·à¸™à¸¢à¸±à¸™à¸à¸µà¸à¸„รั้ง + success: ยืนยันà¸à¸µà¹€à¸¡à¸¥à¹€à¸£à¸µà¸¢à¸šà¸£à¹‰à¸à¸¢à¹à¸¥à¹‰à¸§! reset_password: รีเซ็ตรหัสผ่าน salmon_url: Salmon URL show: diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 0d78216b60d534850ec65f768a99841b6bd3e48c..8bafbface2f7ee69907359db5a152768aa456960 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -29,10 +29,12 @@ tr: are_you_sure: Emin misiniz? confirm: Onayla confirmed: Onaylandı + confirming: Onaylama display_name: Görünen adınız domain: Sunucu edit: Düzenle email: E-posta + email_status: Email Durumu feed_url: Besleme linki followers: Takipçiler follows: Takip edilen @@ -58,6 +60,10 @@ tr: profile_url: Profil linki public: Herkese açık push_subscription_expires: PuSH aboneliÄŸi dolumu + resend_confirmation: + already_confirmed: Bu kullanıcı zaten onaylandı + send: DoÄŸrulama epostasını yeniden gönder + success: Onay e-postası baÅŸarıyla gönderildi! reset_password: Parolayı deÄŸiÅŸtir salmon_url: Salmon Linki show: diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 7ea491fd4b886c54c71628d51a65864e8c221576..5eca9e6a5658075708fb7f2b5cefc63fea4cfc6c 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -61,6 +61,7 @@ zh-CN: by_domain: 域å confirm: 确认 confirmed: 已确认 + confirming: 确认 demote: é™ä»» disable: åœç”¨ disable_two_factor_authentication: åœç”¨åŒé‡è®¤è¯ @@ -69,6 +70,7 @@ zh-CN: domain: 域å edit: 编辑 email: 电åé‚®ä»¶åœ°å€ + email_status: 电åé‚®ä»¶çŠ¶æ€ enable: å¯ç”¨ enabled: å·²å¯ç”¨ feed_url: 订阅 URL @@ -106,6 +108,10 @@ zh-CN: public: å…¬å¼€é¡µé¢ push_subscription_expires: PuSH 订阅过期时间 redownload: åˆ·æ–°å¤´åƒ + resend_confirmation: + already_confirmed: 该用户已被确认 + send: é‡å‘确认邮件 + success: 确认电å邮件æˆåŠŸå‘é€ï¼ reset: é‡ç½® reset_password: é‡ç½®å¯†ç resubscribe: é‡æ–°è®¢é˜… diff --git a/config/locales/zh-HK.yml b/config/locales/zh-HK.yml index 3f91b7191ddd156ba02d33745c2ec1cb1bec77c6..c5d8c869682cc56e3f4e39e2f3e8d60ab880ee44 100644 --- a/config/locales/zh-HK.yml +++ b/config/locales/zh-HK.yml @@ -70,6 +70,7 @@ zh-HK: title: 改變 %{username} 的電郵 confirm: 確定 confirmed: 已確定 + confirming: 確定 demote: é™ä»» disable: åœç”¨ disable_two_factor_authentication: åœç”¨é›™é‡èªè‰ @@ -78,6 +79,7 @@ zh-HK: domain: 域å edit: 編輯 email: é›»éƒµåœ°å€ + email_status: 电åé‚®ä»¶çŠ¶æ€ enable: 啟用 enabled: 已啟用 feed_url: Feed URL @@ -116,6 +118,10 @@ zh-HK: push_subscription_expires: PuSH 訂閱éŽæœŸ redownload: æ›´æ–°é åƒ remove_avatar: å–消é åƒ + resend_confirmation: + already_confirmed: 该用户已被确认 + send: é‡å‘确认邮件 + success: 确认电å邮件æˆåŠŸå‘é€ï¼ reset: é‡è¨ reset_password: é‡è¨å¯†ç¢¼ resubscribe: é‡æ–°è¨‚é–± diff --git a/config/routes.rb b/config/routes.rb index 90f6ac594d2866070f434b006ba3f2cba99e1964..4c920cf74f9beea23e2b98efdfd279d656f5ef7f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -155,8 +155,13 @@ Rails.application.routes.draw do resource :reset, only: [:create] resource :silence, only: [:create, :destroy] resource :suspension, only: [:create, :destroy] - resource :confirmation, only: [:create] - resources :statuses, only: [:index, :create] + resources :statuses, only: [:index, :create, :update, :destroy] + + resource :confirmation, only: [:create] do + collection do + post :resend + end + end resource :role do member do diff --git a/spec/controllers/admin/confirmations_controller_spec.rb b/spec/controllers/admin/confirmations_controller_spec.rb index 7c80349646be7253700c8af78b1cc54369b73525..eec2b2f5c48f6e95b2ea7172a4c43fafc1bddd09 100644 --- a/spec/controllers/admin/confirmations_controller_spec.rb +++ b/spec/controllers/admin/confirmations_controller_spec.rb @@ -30,4 +30,35 @@ RSpec.describe Admin::ConfirmationsController, type: :controller do expect(response).to have_http_status(404) end end + + describe 'POST #resernd' do + subject { post :resend, params: { account_id: account.id } } + + let(:account) { Fabricate(:account) } + let!(:user) { Fabricate(:user, confirmed_at: confirmed_at, account: account) } + + before do + allow(UserMailer).to receive(:confirmation_instructions) { double(:email, deliver_later: nil) } + end + + context 'when email is not confirmed' do + let(:confirmed_at) { nil } + + it 'resends confirmation mail' do + expect(subject).to redirect_to admin_accounts_path + expect(flash[:notice]).to eq I18n.t('admin.accounts.resend_confirmation.success') + expect(UserMailer).to have_received(:confirmation_instructions).once + end + end + + context 'when email is confirmed' do + let(:confirmed_at) { Time.zone.now } + + it 'does not resend confirmation mail' do + expect(subject).to redirect_to admin_accounts_path + expect(flash[:error]).to eq I18n.t('admin.accounts.resend_confirmation.already_confirmed') + expect(UserMailer).not_to have_received(:confirmation_instructions) + end + end + end end