decidim-verifications 0.15.2 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -7
  3. data/app/commands/decidim/verifications/id_documents/admin/confirm_user_offline_authorization.rb +74 -0
  4. data/app/commands/decidim/verifications/id_documents/admin/update_config.rb +39 -0
  5. data/app/controllers/decidim/verifications/id_documents/admin/config_controller.rb +40 -0
  6. data/app/controllers/decidim/verifications/id_documents/admin/offline_confirmations_controller.rb +40 -0
  7. data/app/controllers/decidim/verifications/id_documents/admin/pending_authorizations_controller.rb +13 -2
  8. data/app/controllers/decidim/verifications/id_documents/authorizations_controller.rb +30 -2
  9. data/app/controllers/decidim/verifications/sms/authorizations_controller.rb +76 -0
  10. data/app/forms/decidim/verifications/id_documents/admin/config_form.rb +42 -0
  11. data/app/forms/decidim/verifications/id_documents/admin/offline_confirmation_form.rb +16 -0
  12. data/app/forms/decidim/verifications/id_documents/information_form.rb +12 -1
  13. data/app/forms/decidim/verifications/id_documents/upload_form.rb +2 -1
  14. data/app/forms/decidim/verifications/sms/confirmation_form.rb +19 -0
  15. data/app/forms/decidim/verifications/sms/mobile_phone_form.rb +59 -0
  16. data/app/views/decidim/verifications/id_documents/admin/config/edit.html.erb +26 -0
  17. data/app/views/decidim/verifications/id_documents/admin/confirmations/new.html.erb +1 -0
  18. data/app/views/decidim/verifications/id_documents/admin/offline_confirmations/new.html.erb +24 -0
  19. data/app/views/decidim/verifications/id_documents/admin/pending_authorizations/index.html.erb +3 -1
  20. data/app/views/decidim/verifications/id_documents/authorizations/_form.html.erb +17 -0
  21. data/app/views/decidim/verifications/id_documents/authorizations/choose.html.erb +21 -0
  22. data/app/views/decidim/verifications/id_documents/authorizations/edit.html.erb +14 -23
  23. data/app/views/decidim/verifications/id_documents/authorizations/new.html.erb +6 -13
  24. data/app/views/decidim/verifications/sms/authorizations/edit.html.erb +27 -0
  25. data/app/views/decidim/verifications/sms/authorizations/new.html.erb +27 -0
  26. data/config/locales/ca.yml +51 -1
  27. data/config/locales/de.yml +50 -0
  28. data/config/locales/en.yml +51 -1
  29. data/config/locales/es-PY.yml +50 -0
  30. data/config/locales/es.yml +51 -1
  31. data/config/locales/eu.yml +50 -0
  32. data/config/locales/fi-pl.yml +51 -1
  33. data/config/locales/fi.yml +51 -1
  34. data/config/locales/fr.yml +50 -0
  35. data/config/locales/gl.yml +50 -0
  36. data/config/locales/hu.yml +50 -0
  37. data/config/locales/id-ID.yml +51 -1
  38. data/config/locales/it.yml +50 -0
  39. data/config/locales/nl.yml +50 -0
  40. data/config/locales/pl.yml +50 -0
  41. data/config/locales/pt-BR.yml +50 -0
  42. data/config/locales/pt.yml +50 -0
  43. data/config/locales/sv.yml +50 -0
  44. data/config/locales/tr-TR.yml +51 -1
  45. data/lib/decidim/verifications.rb +1 -0
  46. data/lib/decidim/verifications/id_documents/admin_engine.rb +3 -0
  47. data/lib/decidim/verifications/id_documents/engine.rb +6 -2
  48. data/lib/decidim/verifications/sms.rb +4 -0
  49. data/lib/decidim/verifications/sms/engine.rb +29 -0
  50. data/lib/decidim/verifications/sms/example_gateway.rb +21 -0
  51. data/lib/decidim/verifications/version.rb +1 -1
  52. metadata +27 -9
@@ -1,6 +1,11 @@
1
1
  pt-BR:
2
2
  activemodel:
3
3
  attributes:
4
+ config:
5
+ available_methods: Métodos disponíveis
6
+ offline: desligada
7
+ offline_explanation: Instruções para verificação off-line
8
+ online: Conectados
4
9
  id_document_information:
5
10
  document_number: Número do documento (com letra)
6
11
  document_type: Tipo do documento
@@ -9,6 +14,8 @@ pt-BR:
9
14
  document_type: Tipo do seu documento
10
15
  user: Usuário
11
16
  verification_attachment: Cópia digitalizada do seu documento
17
+ offline_confirmation:
18
+ email: E-mail do usuário
12
19
  postal_letter_address:
13
20
  full_address: Endereço completo
14
21
  postal_letter_confirmation:
@@ -20,6 +27,11 @@ pt-BR:
20
27
  admin:
21
28
  menu:
22
29
  authorization_workflows: Verificações
30
+ admin_log:
31
+ organization:
32
+ update_id_documents_config: "%{user_name} atualizou a configuração de verificação de documentos de identidade"
33
+ user:
34
+ grant_id_documents_offline_verification: "%{user_name} verificado %{resource_name} usando uma verificação de documentos de identidade off-line"
23
35
  authorization_handlers:
24
36
  admin:
25
37
  id_documents:
@@ -70,6 +82,13 @@ pt-BR:
70
82
  other: 'A participação é restrita aos usuários com qualquer um dos seguintes códigos postais: %{postal_codes}.'
71
83
  id_documents:
72
84
  admin:
85
+ config:
86
+ edit:
87
+ title: Configuração de documentos de identidade
88
+ update: Atualizar
89
+ update:
90
+ error: Houve um erro ao atualizar a configuração.
91
+ success: Configuração atualizada com sucesso
73
92
  confirmations:
74
93
  create:
75
94
  error: A verificação não corresponde. Tente novamente ou rejeite a verificação para que o usuário possa corrigi-la
@@ -78,19 +97,36 @@ pt-BR:
78
97
  introduce_user_data: Introduza os dados na imagem
79
98
  reject: Rejeitar
80
99
  verify: Verificar
100
+ offline_confirmations:
101
+ create:
102
+ error: A verificação não corresponde. Tente novamente ou diga ao usuário para alterá-lo
103
+ success: Usuário verificado com sucesso
104
+ new:
105
+ cancel: Cancelar
106
+ introduce_user_data: Introduzir o email do usuário e os dados do documento
107
+ verify: Verificar
81
108
  pending_authorizations:
82
109
  index:
110
+ config: Config
111
+ offline_verification: Verificação off-line
83
112
  title: Verificações pendentes
84
113
  verification_number: 'Verificação # %{n}'
85
114
  rejections:
86
115
  create:
87
116
  success: Verificação rejeitada. O usuário será solicitado a alterar seus documentos
88
117
  authorizations:
118
+ choose:
119
+ choose_a_type: "Por favor, selecione como deseja ser verificado:"
120
+ offline: desligada
121
+ online: Conectados
122
+ title: Confirme-se usando seu documento de identidade
89
123
  create:
90
124
  error: Ocorreu um problema ao carregar seu documento
91
125
  success: Documento carregado com sucesso
92
126
  edit:
93
127
  being_reviewed: Estamos revisando seus documentos. Você será verificado em breve
128
+ offline: Use a verificação off-line
129
+ online: Use a verificação on-line
94
130
  rejection_clarity: Verifique se a informação está claramente visível na imagem carregada
95
131
  rejection_correctness: Verifique se as informações inseridas estão corretas
96
132
  rejection_notice: Ocorreu um problema com sua verificação. Por favor, tente novamente
@@ -133,6 +169,20 @@ pt-BR:
133
169
  update:
134
170
  error: O seu código de verificação não corresponde ao nosso. Verifique a carta que lhe enviamos
135
171
  success: Parabéns. Você foi verificado com sucesso
172
+ sms:
173
+ authorizations:
174
+ create:
175
+ error: Houve um problema com o seu pedido
176
+ success: Obrigado! Enviamos um SMS para o seu telefone.
177
+ edit:
178
+ send: confirme
179
+ title: Introduza o código de verificação recebido
180
+ new:
181
+ send: Envie-me um SMS
182
+ title: Solicite seu código de verificação
183
+ update:
184
+ error: Seu código de verificação não corresponde ao nosso. Por favor, verifique novamente o SMS que lhe enviamos.
185
+ success: Parabéns. Você foi confirmado com sucesso.
136
186
  errors:
137
187
  messages:
138
188
  uppercase_only_letters_numbers: devem ser todas maiúsculas e conter apenas letras e / ou números
@@ -1,6 +1,11 @@
1
1
  pt:
2
2
  activemodel:
3
3
  attributes:
4
+ config:
5
+ available_methods: Métodos disponíveis
6
+ offline: desligada
7
+ offline_explanation: Instruções para verificação off-line
8
+ online: Conectados
4
9
  id_document_information:
5
10
  document_number: Número do documento (com letra)
6
11
  document_type: Tipo do documento
@@ -9,6 +14,8 @@ pt:
9
14
  document_type: Tipo do seu documento
10
15
  user: Do utilizador
11
16
  verification_attachment: Cópia digitalizada do seu documento
17
+ offline_confirmation:
18
+ email: E-mail do usuário
12
19
  postal_letter_address:
13
20
  full_address: Endereço completo
14
21
  postal_letter_confirmation:
@@ -20,6 +27,11 @@ pt:
20
27
  admin:
21
28
  menu:
22
29
  authorization_workflows: Verificações
30
+ admin_log:
31
+ organization:
32
+ update_id_documents_config: "%{user_name} atualizou a configuração de verificação de documentos de identidade"
33
+ user:
34
+ grant_id_documents_offline_verification: "%{user_name} verificado %{resource_name} usando uma verificação de documentos de identidade off-line"
23
35
  authorization_handlers:
24
36
  admin:
25
37
  id_documents:
@@ -70,6 +82,13 @@ pt:
70
82
  other: 'A participação é restrita aos usuários com qualquer um dos seguintes códigos postais: %{postal_codes}.'
71
83
  id_documents:
72
84
  admin:
85
+ config:
86
+ edit:
87
+ title: Configuração de documentos de identidade
88
+ update: Atualizar
89
+ update:
90
+ error: Houve um erro ao atualizar a configuração.
91
+ success: Configuração atualizada com sucesso
73
92
  confirmations:
74
93
  create:
75
94
  error: A verificação não corresponde. Tente novamente ou rejeite a verificação para que o usuário possa corrigi-la
@@ -78,19 +97,36 @@ pt:
78
97
  introduce_user_data: Introduza os dados na imagem
79
98
  reject: Rejeitar
80
99
  verify: Verificar
100
+ offline_confirmations:
101
+ create:
102
+ error: A verificação não corresponde. Tente novamente ou diga ao usuário para alterá-lo
103
+ success: Usuário verificado com sucesso
104
+ new:
105
+ cancel: Cancelar
106
+ introduce_user_data: Introduzir o email do usuário e os dados do documento
107
+ verify: Verificar
81
108
  pending_authorizations:
82
109
  index:
110
+ config: Config
111
+ offline_verification: Verificação off-line
83
112
  title: Verificações pendentes
84
113
  verification_number: 'Verificação # %{n}'
85
114
  rejections:
86
115
  create:
87
116
  success: Verificação rejeitada. O usuário será solicitado a alterar seus documentos
88
117
  authorizations:
118
+ choose:
119
+ choose_a_type: "Por favor, selecione como deseja ser verificado:"
120
+ offline: desligada
121
+ online: Conectados
122
+ title: Confirme-se usando seu documento de identidade
89
123
  create:
90
124
  error: Ocorreu um problema ao carregar seu documento
91
125
  success: Documento carregado com sucesso
92
126
  edit:
93
127
  being_reviewed: Estamos revisando seus documentos. Você será verificado em breve
128
+ offline: Use a verificação off-line
129
+ online: Use a verificação on-line
94
130
  rejection_clarity: Verifique se a informação está claramente visível na imagem carregada
95
131
  rejection_correctness: Verifique se as informações inseridas estão corretas
96
132
  rejection_notice: Ocorreu um problema com sua verificação. Por favor, tente novamente
@@ -133,6 +169,20 @@ pt:
133
169
  update:
134
170
  error: O seu código de verificação não corresponde ao nosso. Verifique a carta que lhe enviamos
135
171
  success: Parabéns. Você foi verificado com sucesso
172
+ sms:
173
+ authorizations:
174
+ create:
175
+ error: Houve um problema com o seu pedido
176
+ success: Obrigado! Enviamos um SMS para o seu telefone.
177
+ edit:
178
+ send: confirme
179
+ title: Introduza o código de verificação recebido
180
+ new:
181
+ send: Envie-me um SMS
182
+ title: Solicite seu código de verificação
183
+ update:
184
+ error: Seu código de verificação não corresponde ao nosso. Por favor, verifique novamente o SMS que lhe enviamos.
185
+ success: Parabéns. Você foi confirmado com sucesso.
136
186
  errors:
137
187
  messages:
138
188
  uppercase_only_letters_numbers: devem ser todas maiúsculas e conter apenas letras e / ou números
@@ -1,6 +1,11 @@
1
1
  sv:
2
2
  activemodel:
3
3
  attributes:
4
+ config:
5
+ available_methods: Tillgängliga metoder
6
+ offline: Off-line
7
+ offline_explanation: Instruktioner för offline verifiering
8
+ online: Uppkopplad
4
9
  id_document_information:
5
10
  document_number: Dokumentnummer (med bokstav)
6
11
  document_type: Typ av dokumentet
@@ -9,6 +14,8 @@ sv:
9
14
  document_type: Typ av ditt dokument
10
15
  user: Användare
11
16
  verification_attachment: Skannad kopia av ditt dokument
17
+ offline_confirmation:
18
+ email: Användar-e-post
12
19
  postal_letter_address:
13
20
  full_address: Fullständig adress
14
21
  postal_letter_confirmation:
@@ -20,6 +27,11 @@ sv:
20
27
  admin:
21
28
  menu:
22
29
  authorization_workflows: Verifieringar
30
+ admin_log:
31
+ organization:
32
+ update_id_documents_config: "%{user_name} uppdaterade konfiguration av identitetshandlingar"
33
+ user:
34
+ grant_id_documents_offline_verification: "%{user_name} verifierad %{resource_name} hjälp av en offline ID-dokument verifiering"
23
35
  authorization_handlers:
24
36
  admin:
25
37
  id_documents:
@@ -70,6 +82,13 @@ sv:
70
82
  other: 'Deltagande är begränsat till användare med någon av följande postnummer: %{postal_codes}.'
71
83
  id_documents:
72
84
  admin:
85
+ config:
86
+ edit:
87
+ title: Konfiguration av identitetsdokument
88
+ update: Uppdatering
89
+ update:
90
+ error: Det uppstod ett fel vid uppdatering av konfigurationen.
91
+ success: Konfigurationen har uppdaterats
73
92
  confirmations:
74
93
  create:
75
94
  error: Verifieringen matchar inte. Försök igen eller avvisa verifieringen så att användaren kan ändra den
@@ -78,19 +97,36 @@ sv:
78
97
  introduce_user_data: Presentera data i bilden
79
98
  reject: Avvisa
80
99
  verify: Verifiera
100
+ offline_confirmations:
101
+ create:
102
+ error: Verifieringen matchar inte. Försök igen eller berätta för användaren att ändra den
103
+ success: Användaren har verifierats
104
+ new:
105
+ cancel: Annullera
106
+ introduce_user_data: Presentation av användar-e-post och dokumentdata
107
+ verify: Kontrollera
81
108
  pending_authorizations:
82
109
  index:
110
+ config: config
111
+ offline_verification: Offline verifiering
83
112
  title: Pågående verifieringar
84
113
  verification_number: 'Verifiering #%{n}'
85
114
  rejections:
86
115
  create:
87
116
  success: Verifieringen avvisades. Användaren kommer att uppmanas att ändra sina dokument
88
117
  authorizations:
118
+ choose:
119
+ choose_a_type: "Var god välj hur du vill verifieras:"
120
+ offline: Off-line
121
+ online: Uppkopplad
122
+ title: Verifiera dig själv med ditt identitetsdokument
89
123
  create:
90
124
  error: Det gick inte att ladda upp dokumentet
91
125
  success: Dokumentet har laddats upp
92
126
  edit:
93
127
  being_reviewed: Vi granskar dina dokument. Du kommer att verifieras inom kort
128
+ offline: Använd offline verifiering
129
+ online: Använd online verifiering
94
130
  rejection_clarity: Se till att informationen syns tydligt i den uppladdade bilden
95
131
  rejection_correctness: Se till att informationen som angivits är korrekt
96
132
  rejection_notice: Det uppstod ett problem med din verifiering. Var god försök igen
@@ -133,6 +169,20 @@ sv:
133
169
  update:
134
170
  error: Din verifieringskod stämmer inte överens med vår. Vänligen dubbelklicka på det brev vi skickade till dig
135
171
  success: Grattis. Du har blivit verifierad
172
+ sms:
173
+ authorizations:
174
+ create:
175
+ error: Ett problem uppstod med din förfrågan
176
+ success: Tack! Vi har skickat ett SMS till din telefon.
177
+ edit:
178
+ send: Bekräfta
179
+ title: Presentera verifieringskoden du fick
180
+ new:
181
+ send: Skicka mig ett SMS
182
+ title: Begär din verifieringskod
183
+ update:
184
+ error: Din verifieringskod stämmer inte överens med vår. Vänligen dubbelklicka på det SMS vi skickade till dig.
185
+ success: Grattis. Du har blivit verifierad.
136
186
  errors:
137
187
  messages:
138
188
  uppercase_only_letters_numbers: måste vara versaler och endast innehålla bokstäver och/eller siffror
@@ -1,6 +1,11 @@
1
1
  tr:
2
2
  activemodel:
3
3
  attributes:
4
+ config:
5
+ available_methods: Mevcut yöntemler
6
+ offline: Çevrimdışı
7
+ offline_explanation: Çevrimdışı doğrulama için talimatlar
8
+ online: İnternet üzerinden
4
9
  id_document_information:
5
10
  document_number: Belge numarası (harf ile)
6
11
  document_type: Belgenin türü
@@ -9,6 +14,8 @@ tr:
9
14
  document_type: Belgenizin tipi
10
15
  user: kullanıcı
11
16
  verification_attachment: Belgenizin taranmış kopyası
17
+ offline_confirmation:
18
+ email: Kullanıcı e-postası
12
19
  postal_letter_address:
13
20
  full_address: Açık adres
14
21
  postal_letter_confirmation:
@@ -20,6 +27,11 @@ tr:
20
27
  admin:
21
28
  menu:
22
29
  authorization_workflows: Doğrulama
30
+ admin_log:
31
+ organization:
32
+ update_id_documents_config: "%{user_name} Kimlik Belgeleri doğrulama yapılandırmasını güncelledi"
33
+ user:
34
+ grant_id_documents_offline_verification: "%{user_name} bir çevrimdışı Kimlik Belgeleri doğrulaması kullanarak %{resource_name} doğrulandı"
23
35
  authorization_handlers:
24
36
  admin:
25
37
  id_documents:
@@ -70,6 +82,13 @@ tr:
70
82
  other: 'Katılım, aşağıdaki posta kodlarından herhangi biriyle kullanıcılarla sınırlıdır: %{postal_codes}.'
71
83
  id_documents:
72
84
  admin:
85
+ config:
86
+ edit:
87
+ title: Kimlik belgeleri yapılandırması
88
+ update: Güncelleştirme
89
+ update:
90
+ error: Yapılandırma güncellenirken bir hata oluştu.
91
+ success: Yapılandırma başarıyla güncellendi
73
92
  confirmations:
74
93
  create:
75
94
  error: Doğrulama uyuşmuyor. Tekrar deneyebilir veya doğrulamayı reddedebilir, böylece kullanıcı bunu değiştirebilir
@@ -78,19 +97,36 @@ tr:
78
97
  introduce_user_data: Resimdeki verileri tanıtın
79
98
  reject: reddetmek
80
99
  verify: DOĞRULAYIN
100
+ offline_confirmations:
101
+ create:
102
+ error: Doğrulama uyuşmuyor. Tekrar dene veya kullanıcıyı değiştirmesini söyle
103
+ success: Kullanıcı başarıyla doğrulandı
104
+ new:
105
+ cancel: İptal etmek
106
+ introduce_user_data: Kullanıcı e-postasını ve belge verilerini tanıtın
107
+ verify: DOĞRULAYIN
81
108
  pending_authorizations:
82
109
  index:
83
- title: Doğrulama bekleniyor
110
+ config: Yapılandırma
111
+ offline_verification: Çevrimdışı doğrulama
112
+ title: Bekleyen çevrimiçi doğrulamalar
84
113
  verification_number: 'Doğrulama #%{n}'
85
114
  rejections:
86
115
  create:
87
116
  success: Doğrulama reddedildi. Kullanıcı dokümanlarını değiştirmek için istenecektir
88
117
  authorizations:
118
+ choose:
119
+ choose_a_type: "Lütfen nasıl doğrulanmak istediğinizi seçin:"
120
+ offline: Çevrimdışı
121
+ online: İnternet üzerinden
122
+ title: Kimlik belgenizi kullanarak kendinizi doğrulayın
89
123
  create:
90
124
  error: Belgenizi yüklerken bir sorun oluştu
91
125
  success: Belge başarıyla yüklendi
92
126
  edit:
93
127
  being_reviewed: Belgelerini inceliyoruz. Kısa bir süre sonra doğrulanacaksınız
128
+ offline: Çevrimdışı doğrulamayı kullan
129
+ online: Çevrimiçi doğrulamayı kullan
94
130
  rejection_clarity: Yüklenen görselde bilgilerin net bir şekilde göründüğünden emin olun.
95
131
  rejection_correctness: Girilen bilgilerin doğru olduğundan emin olun.
96
132
  rejection_notice: Doğrulamanızla ilgili bir sorun oluştu. Lütfen tekrar deneyin
@@ -133,6 +169,20 @@ tr:
133
169
  update:
134
170
  error: Doğrulama kodunuz bizimkilerle uyuşmuyor. Lütfen size gönderdiğimiz mektubu iki kez kontrol edin
135
171
  success: Tebrikler. Başarıyla doğrulandı
172
+ sms:
173
+ authorizations:
174
+ create:
175
+ error: İsteğiniz ile ilgili bir sorun vardı
176
+ success: Teşekkürler! Telefonunuza bir SMS gönderdik.
177
+ edit:
178
+ send: Onaylamak
179
+ title: Aldığınız doğrulama kodunu tanıtın
180
+ new:
181
+ send: Bana bir SMS gönder
182
+ title: Doğrulama kodunuzu isteyin
183
+ update:
184
+ error: Doğrulama kodunuz bizimkilerle uyuşmuyor. Lütfen size gönderdiğimiz SMS'i tekrar kontrol edin.
185
+ success: Tebrikler. Başarıyla doğrulandı.
136
186
  errors:
137
187
  messages:
138
188
  uppercase_only_letters_numbers: tüm büyük harf olmalı ve sadece harf ve / veya sayı içermelidir
@@ -6,6 +6,7 @@ require "decidim/verifications/workflows"
6
6
 
7
7
  require "decidim/verifications/id_documents"
8
8
  require "decidim/verifications/postal_letter"
9
+ require "decidim/verifications/sms"
9
10
 
10
11
  module Decidim
11
12
  def self.authorization_workflows
@@ -15,6 +15,9 @@ module Decidim
15
15
  resource :confirmations, only: [:new, :create], as: :confirmation
16
16
  resource :rejections, only: :create, as: :rejection
17
17
  end
18
+ resource :offline_confirmations, only: [:new, :create], as: :offline_confirmation
19
+
20
+ resource :config, only: [:edit, :update], controller: "config"
18
21
 
19
22
  root to: "pending_authorizations#index"
20
23
  end
@@ -11,9 +11,13 @@ module Decidim
11
11
  paths["lib/tasks"] = nil
12
12
 
13
13
  routes do
14
- resource :authorizations, only: [:new, :create, :edit, :update], as: :authorization
14
+ resource :authorizations, only: [:new, :create, :edit, :update], as: :authorization do
15
+ collection do
16
+ get :choose
17
+ end
18
+ end
15
19
 
16
- root to: "authorizations#new"
20
+ root to: "authorizations#choose"
17
21
  end
18
22
  end
19
23
  end