decidim-verifications 0.27.5 → 0.28.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/app/cells/decidim/verifications/revocations/show.erb +18 -16
- data/app/commands/decidim/verifications/authorize_user.rb +24 -3
- data/app/commands/decidim/verifications/confirm_user_authorization.rb +1 -1
- data/app/commands/decidim/verifications/csv_census/admin/create_census_data.rb +1 -1
- data/app/commands/decidim/verifications/id_documents/admin/confirm_user_offline_authorization.rb +1 -1
- data/app/commands/decidim/verifications/perform_authorization_step.rb +1 -1
- data/app/commands/decidim/verifications/revoke_all_authorizations.rb +2 -2
- data/app/commands/decidim/verifications/revoke_by_condition_authorizations.rb +3 -3
- data/app/controllers/concerns/decidim/verifications/renewable.rb +2 -2
- data/app/controllers/decidim/verifications/application_controller.rb +3 -0
- data/app/controllers/decidim/verifications/authorizations_controller.rb +20 -4
- data/app/controllers/decidim/verifications/id_documents/authorizations_controller.rb +6 -6
- data/app/controllers/decidim/verifications/sms/authorizations_controller.rb +7 -11
- data/app/events/decidim/verifications/managed_user_error_event.rb +3 -8
- data/app/forms/decidim/verifications/postal_letter/postage_form.rb +1 -1
- data/app/forms/decidim/verifications/sms/mobile_phone_form.rb +7 -3
- data/app/helpers/decidim/verifications/application_helper.rb +91 -0
- data/app/jobs/decidim/verifications/csv_census/application_job.rb +1 -1
- data/app/jobs/decidim/verifications/csv_census/remove_duplicates_job.rb +1 -1
- data/app/models/decidim/verifications/csv_census/data.rb +1 -1
- data/app/models/decidim/verifications/csv_datum.rb +3 -3
- data/app/packs/entrypoints/decidim_verifications.js +2 -0
- data/app/packs/stylesheets/verifications.scss +58 -0
- data/app/presenters/decidim/verifications/postal_letter/authorization_presenter.rb +1 -1
- data/app/queries/decidim/verifications/authorizations.rb +2 -2
- data/app/services/decidim/authorization_handler.rb +45 -13
- data/app/views/decidim/verifications/authorizations/_item.html.erb +31 -0
- data/app/views/decidim/verifications/authorizations/first_login.html.erb +20 -21
- data/app/views/decidim/verifications/authorizations/index.html.erb +28 -73
- data/app/views/decidim/verifications/authorizations/new.html.erb +27 -29
- data/app/views/decidim/verifications/authorizations/renew_modal.html.erb +23 -30
- data/app/views/decidim/verifications/csv_census/admin/census/index.html.erb +54 -39
- data/app/views/decidim/verifications/csv_census/admin/census/instructions.html.erb +3 -2
- data/app/views/decidim/verifications/id_documents/admin/config/edit.html.erb +30 -21
- data/app/views/decidim/verifications/id_documents/admin/confirmations/new.html.erb +38 -22
- data/app/views/decidim/verifications/id_documents/admin/offline_confirmations/new.html.erb +39 -21
- data/app/views/decidim/verifications/id_documents/admin/pending_authorizations/index.html.erb +4 -4
- data/app/views/decidim/verifications/id_documents/authorizations/_form.html.erb +4 -10
- data/app/views/decidim/verifications/id_documents/authorizations/choose.html.erb +10 -19
- data/app/views/decidim/verifications/id_documents/authorizations/edit.html.erb +32 -41
- data/app/views/decidim/verifications/id_documents/authorizations/new.html.erb +19 -25
- data/app/views/decidim/verifications/postal_letter/admin/pending_authorizations/index.html.erb +53 -48
- data/app/views/decidim/verifications/postal_letter/authorizations/edit.html.erb +32 -34
- data/app/views/decidim/verifications/postal_letter/authorizations/new.html.erb +20 -25
- data/app/views/decidim/verifications/sms/authorizations/edit.html.erb +25 -34
- data/app/views/decidim/verifications/sms/authorizations/new.html.erb +20 -25
- data/app/views/dummy_authorization/_form.html.erb +6 -16
- data/app/views/layouts/decidim/authorizations.html.erb +8 -0
- data/config/assets.rb +8 -0
- data/config/locales/ar.yml +1 -53
- data/config/locales/ca.yml +46 -40
- data/config/locales/cs.yml +48 -42
- data/config/locales/de.yml +44 -38
- data/config/locales/el.yml +1 -62
- data/config/locales/en.yml +52 -46
- data/config/locales/es-MX.yml +47 -41
- data/config/locales/es-PY.yml +47 -41
- data/config/locales/es.yml +46 -40
- data/config/locales/eu.yml +51 -45
- data/config/locales/fi-plain.yml +48 -42
- data/config/locales/fi.yml +45 -39
- data/config/locales/fr-CA.yml +50 -44
- data/config/locales/fr.yml +50 -44
- data/config/locales/ga-IE.yml +0 -1
- data/config/locales/gl.yml +1 -62
- data/config/locales/hu.yml +48 -45
- data/config/locales/id-ID.yml +1 -53
- data/config/locales/is-IS.yml +1 -24
- data/config/locales/it.yml +1 -62
- data/config/locales/ja.yml +50 -44
- data/config/locales/lt.yml +43 -37
- data/config/locales/lv.yml +1 -61
- data/config/locales/nl.yml +1 -62
- data/config/locales/no.yml +1 -62
- data/config/locales/pl.yml +1 -62
- data/config/locales/pt-BR.yml +1 -69
- data/config/locales/pt.yml +1 -62
- data/config/locales/ro-RO.yml +5 -62
- data/config/locales/ru.yml +1 -31
- data/config/locales/sk.yml +1 -61
- data/config/locales/sv.yml +3 -62
- data/config/locales/tr-TR.yml +1 -62
- data/config/locales/uk.yml +1 -31
- data/config/locales/zh-CN.yml +1 -62
- data/config/locales/zh-TW.yml +33 -27
- data/lib/decidim/verifications/adapter.rb +7 -7
- data/lib/decidim/verifications/csv_census/workflow.rb +1 -0
- data/lib/decidim/verifications/id_documents/workflow.rb +1 -0
- data/lib/decidim/verifications/postal_letter/workflow.rb +1 -0
- data/lib/decidim/verifications/sms/engine.rb +2 -1
- data/lib/decidim/verifications/sms/example_gateway.rb +3 -2
- data/lib/decidim/verifications/version.rb +1 -1
- data/lib/decidim/verifications/workflow_manifest.rb +2 -1
- data/lib/decidim/verifications/workflows.rb +2 -2
- metadata +25 -16
- data/app/views/decidim/verifications/authorizations/_granted_authorization.html.erb +0 -32
- data/config/environment.rb +0 -3
data/config/locales/zh-CN.yml
CHANGED
@@ -31,24 +31,15 @@ zh-CN:
|
|
31
31
|
before_date_info: 如果进程已经开始并且你想要撤销上一个进程的权限,将非常有用。
|
32
32
|
button: 全部取消
|
33
33
|
button_before: 取消之前的日期
|
34
|
-
destroy:
|
35
|
-
confirm: 在日期前撤销授权无法撤销。您确定要继续吗?
|
36
|
-
confirm_all: 撤销所有授权无法撤销。您确定要继续吗?
|
37
|
-
destroy_nok: 撤销授权时出现问题。
|
38
34
|
info: 共有 %{count} 个已验证的参与者。
|
39
|
-
no_data: 没有经过验证的参与者
|
40
35
|
authorization_handlers:
|
41
36
|
admin:
|
42
|
-
csv_census:
|
43
|
-
help:
|
44
|
-
- 管理员通过接受的电子邮件上传CSV
|
45
|
-
- 只有那个CSV文件中有电子邮件的参与者才能获得验证
|
46
37
|
id_documents:
|
47
38
|
help:
|
48
39
|
- 用户填写其身份资料并上载其文件副本。
|
49
40
|
- 您填写上传图片中的信息。
|
50
41
|
- 信息应匹配用户填写的任何信息。
|
51
|
-
-
|
42
|
+
-
|
52
43
|
postal_letter:
|
53
44
|
help:
|
54
45
|
- 参与者要求将验证码发送到他们的地址。
|
@@ -56,17 +47,14 @@ zh-CN:
|
|
56
47
|
- 您将信件标记为已发送。
|
57
48
|
- 一旦您将信件标记为发送,参与者将能够引入代码并获得验证。
|
58
49
|
csv_census:
|
59
|
-
explanation: 通过该组织的普查获得验证
|
60
50
|
name: 本组织的人口普查情况
|
61
51
|
direct: 直线
|
62
52
|
help: 帮助
|
63
53
|
id_documents:
|
64
|
-
explanation: 上传您的身份证件,以便我们检查您的身份
|
65
54
|
name: 身份文件
|
66
55
|
multistep: 多步
|
67
56
|
name: 名称
|
68
57
|
postal_letter:
|
69
|
-
explanation: 我们将向您发送一封带有您必须输入的代码的邮件,我们才能验证您的地址
|
70
58
|
name: 邮寄代码
|
71
59
|
verifications:
|
72
60
|
authorizations:
|
@@ -75,11 +63,9 @@ zh-CN:
|
|
75
63
|
no_data_stored: 没有存储数据。
|
76
64
|
create:
|
77
65
|
error: 创建授权时出现问题。
|
78
|
-
success: 您已成功授权。
|
79
66
|
unconfirmed: 您需要确认您的电子邮件才能授权自己。
|
80
67
|
destroy:
|
81
68
|
error: 删除授权时出错。
|
82
|
-
success: 您已成功删除授权。
|
83
69
|
first_login:
|
84
70
|
actions:
|
85
71
|
another_dummy_authorization_handler: 验证另一个验证处理程序
|
@@ -95,15 +81,12 @@ zh-CN:
|
|
95
81
|
expired_verification: 验证已过期
|
96
82
|
pending_verification: 待验证
|
97
83
|
show_renew_info: 点击以更新验证
|
98
|
-
unauthorized_verification: 新的验证
|
99
84
|
new:
|
100
85
|
authorize: 发送
|
101
86
|
authorize_with: 使用 %{authorizer} 验证
|
102
87
|
renew_modal:
|
103
88
|
cancel: 取消
|
104
|
-
close: 关闭
|
105
89
|
continue: 继续
|
106
|
-
info_renew: 如果您想要更新数据,请继续更新
|
107
90
|
title: 更新验证
|
108
91
|
skip_verification: 您现在可以跳过它, %{link}
|
109
92
|
start_exploring: 开始探索中
|
@@ -112,14 +95,9 @@ zh-CN:
|
|
112
95
|
census:
|
113
96
|
create:
|
114
97
|
error: 导入普查时出错。
|
115
|
-
success: 成功导入 %{count} 个项目 (%{errors} 个错误)
|
116
|
-
destroy_all:
|
117
|
-
success: 所有普查数据已被删除
|
118
98
|
destroy:
|
119
|
-
confirm: 删除所有普查无法撤消。您确定要继续吗?
|
120
99
|
title: 删除所有普查数据
|
121
100
|
index:
|
122
|
-
data: 总共载入了 %{count} 条记录。最后上传日期在 %{due_date}
|
123
101
|
empty: 没有普查数据。使用下面的表单导入CSV文件。
|
124
102
|
title: 目前的普查数据
|
125
103
|
instructions:
|
@@ -144,19 +122,12 @@ zh-CN:
|
|
144
122
|
update: 更新
|
145
123
|
update:
|
146
124
|
error: 更新配置时出现问题。
|
147
|
-
success: 配置已成功更新
|
148
125
|
confirmations:
|
149
|
-
create:
|
150
|
-
error: 验证不匹配。请重试或拒绝验证,以便参与者可以修改
|
151
|
-
success: 参与者已成功验证
|
152
126
|
new:
|
153
127
|
introduce_user_data: 在图片中介绍数据
|
154
128
|
reject: 拒绝
|
155
129
|
verify: 验证
|
156
130
|
offline_confirmations:
|
157
|
-
create:
|
158
|
-
error: 验证不匹配。请重试或告诉参与者修改
|
159
|
-
success: 参与者已成功验证
|
160
131
|
new:
|
161
132
|
cancel: 取消
|
162
133
|
introduce_user_data: 介绍参与者电子邮件和文档数据
|
@@ -167,32 +138,19 @@ zh-CN:
|
|
167
138
|
offline_verification: 离线验证
|
168
139
|
title: 待定在线验证
|
169
140
|
verification_number: '验证 #%{n}'
|
170
|
-
rejections:
|
171
|
-
create:
|
172
|
-
success: 验证被拒绝。参与者将被提示修改她的文档
|
173
141
|
authorizations:
|
174
142
|
choose:
|
175
143
|
choose_a_type: '请选择您想要验证的方式:'
|
176
144
|
offline: 离线的
|
177
145
|
online: 在线
|
178
146
|
title: 使用您的身份证件验证自己
|
179
|
-
create:
|
180
|
-
error: 上传您的文档时出现问题
|
181
|
-
success: 文档上传成功
|
182
147
|
edit:
|
183
|
-
being_reviewed: 我们正在审查您的文档。您将很快被验证
|
184
148
|
offline: 使用离线验证
|
185
149
|
online: 使用在线验证
|
186
|
-
rejection_clarity: 请确保上传图像中的信息清晰可见。
|
187
|
-
rejection_correctness: 请确保输入的信息正确
|
188
|
-
rejection_notice: 您的验证有问题。请再试一次
|
189
150
|
send: 再次请求验证
|
190
151
|
new:
|
191
152
|
send: 请求验证
|
192
153
|
title: 上传您的身份文档
|
193
|
-
update:
|
194
|
-
error: 重新上传您的文档时出现问题
|
195
|
-
success: 文档已成功重新上传
|
196
154
|
dni: DNI
|
197
155
|
nie: NIE
|
198
156
|
passport: 护照:
|
@@ -207,43 +165,24 @@ zh-CN:
|
|
207
165
|
title: 进行中的验证
|
208
166
|
username: 昵称
|
209
167
|
verification_code: 验证码
|
210
|
-
postages:
|
211
|
-
create:
|
212
|
-
error: 标记已发送信件时出错
|
213
|
-
success: 已成功标记为已发送
|
214
168
|
authorizations:
|
215
|
-
create:
|
216
|
-
error: 您的请求有问题
|
217
|
-
success: 谢谢!我们会向您的地址发送验证码
|
218
169
|
edit:
|
219
170
|
send: 确认
|
220
|
-
title: 介绍您收到的验证码
|
221
|
-
waiting_for_letter: 我们将很快向您的地址发送一封信并附上您的验证码
|
222
171
|
new:
|
223
172
|
send: 给我发信
|
224
173
|
title: 请求您的验证码
|
225
|
-
update:
|
226
|
-
error: 您的验证码与我们不匹配。请再次检查我们发送给您的信件
|
227
|
-
success: 恭喜您。您已成功验证
|
228
174
|
sms:
|
229
175
|
authorizations:
|
230
|
-
create:
|
231
|
-
error: 您的请求有问题
|
232
|
-
success: 谢谢!我们已经向您的手机发送短信。
|
233
176
|
destroy:
|
234
177
|
success: 验证码已成功重置。请重新输入您的电话号码。
|
235
178
|
edit:
|
236
179
|
confirm_destroy: 您确定要重置验证码吗?
|
237
180
|
destroy: 重置验证码
|
238
|
-
resend: 没有收到验证码?
|
239
181
|
send: 确认
|
240
182
|
title: 介绍您收到的验证码
|
241
183
|
new:
|
242
184
|
send: 给我发送短信
|
243
185
|
title: 请求您的验证码
|
244
|
-
update:
|
245
|
-
error: 您的验证码与我们不匹配。请再次检查我们发送给您的短信。
|
246
|
-
success: 恭喜您。您已成功验证。
|
247
186
|
errors:
|
248
187
|
messages:
|
249
188
|
uppercase_only_letters_numbers: 必须是所有大写并只包含字母和/或数字
|
data/config/locales/zh-TW.yml
CHANGED
@@ -43,7 +43,7 @@ zh-TW:
|
|
43
43
|
destroy_nok: 撤銷授權時發生問題。
|
44
44
|
destroy_ok: 所有匹配的授權已成功撤銷。
|
45
45
|
info: 總共有 %{count} 名已驗證的參與者。
|
46
|
-
no_data:
|
46
|
+
no_data: 沒有經過驗證的參與者.
|
47
47
|
title: 授權撤銷
|
48
48
|
authorization_workflows: 授權
|
49
49
|
admin_log:
|
@@ -55,7 +55,7 @@ zh-TW:
|
|
55
55
|
admin:
|
56
56
|
csv_census:
|
57
57
|
help:
|
58
|
-
- 管理員上傳一個包含已接受參與者電子郵件的 CSV
|
58
|
+
- 管理員上傳一個包含已接受參與者電子郵件的 CSV 檔案.
|
59
59
|
- 只有在 CSV 檔案中的電子郵件被列出的參與者才能取得驗證。
|
60
60
|
id_documents:
|
61
61
|
help:
|
@@ -70,17 +70,17 @@ zh-TW:
|
|
70
70
|
- 您將信件標記為已發送。
|
71
71
|
- 一旦您將信件標記為已發送,參與者便能輸入驗證碼並通過驗證。
|
72
72
|
csv_census:
|
73
|
-
explanation:
|
73
|
+
explanation: 使用組織人口普查的方式進行驗證.
|
74
74
|
name: 組織的普查
|
75
75
|
direct: 直接
|
76
76
|
help: 幫助
|
77
77
|
id_documents:
|
78
|
-
explanation:
|
78
|
+
explanation: 上傳您的身分證明文件,以便我們可以檢查您的身分證明.
|
79
79
|
name: 身分證件
|
80
80
|
multistep: 多步驟
|
81
81
|
name: 姓名
|
82
82
|
postal_letter:
|
83
|
-
explanation:
|
83
|
+
explanation: 我們將會寄送一封郵寄信件給您,信中包含一個代碼,請在平台上輸入此代碼以驗證您的地址.
|
84
84
|
name: 郵件信函驗證碼
|
85
85
|
events:
|
86
86
|
verifications:
|
@@ -97,10 +97,11 @@ zh-TW:
|
|
97
97
|
create:
|
98
98
|
error: 創建授權時出現問題。
|
99
99
|
success: 你已經成功被授權。
|
100
|
+
transferred: '基於您的授權,我們已恢復以下參與資料:'
|
100
101
|
unconfirmed: 您需要確認您的電子郵件以授權。
|
101
102
|
destroy:
|
102
103
|
error: 刪除授權時出現問題。
|
103
|
-
success:
|
104
|
+
success: 您已成功刪除授權。
|
104
105
|
first_login:
|
105
106
|
actions:
|
106
107
|
another_dummy_authorization_handler: 使用另一個授權處理器進行驗證
|
@@ -114,15 +115,17 @@ zh-TW:
|
|
114
115
|
verify_with_these_options: '這是可以驗證您身份的可用選項:'
|
115
116
|
index:
|
116
117
|
expired_verification: 驗證已過期
|
118
|
+
granted_verification: 已授權驗證
|
119
|
+
introduce_code: 輸入代碼
|
117
120
|
pending_verification: 待驗證
|
118
121
|
show_renew_info: 點擊更新驗證
|
119
|
-
|
122
|
+
subscribe: 訂閱
|
123
|
+
unauthorized_methods: 驗證方式
|
120
124
|
new:
|
121
125
|
authorize: 發送
|
122
126
|
authorize_with: 使用 %{authorizer} 驗證
|
123
127
|
renew_modal:
|
124
128
|
cancel: 取消
|
125
|
-
close: 關閉
|
126
129
|
continue: 繼續
|
127
130
|
info_renew: 如果您想要更新資料,請繼續進行更新。
|
128
131
|
title: 更新驗證
|
@@ -133,11 +136,11 @@ zh-TW:
|
|
133
136
|
census:
|
134
137
|
create:
|
135
138
|
error: 匯入戶籍普查資料時發生錯誤。
|
136
|
-
success: 成功匯入 %{count} 項目(%{errors} 錯誤)
|
139
|
+
success: 成功匯入 %{count} 項目(%{errors} 錯誤).
|
137
140
|
destroy_all:
|
138
|
-
success:
|
141
|
+
success: 所有戶籍數據都已刪除.
|
139
142
|
destroy:
|
140
|
-
confirm:
|
143
|
+
confirm: 刪除所有戶籍資料將無法還原,您確定要繼續嗎?
|
141
144
|
title: 刪除所有戶籍資料
|
142
145
|
index:
|
143
146
|
data: 總共載入了 %{count} 筆記錄。最後上傳日期為 %{due_date}。
|
@@ -147,6 +150,9 @@ zh-TW:
|
|
147
150
|
body: 您需要進入系統管理,並向組織添加 csv_census 授權以進行操作。
|
148
151
|
title: 您需要為此組織啟用 CSV 戶籍調查。
|
149
152
|
new:
|
153
|
+
example: |
|
154
|
+
john.doe@example.org
|
155
|
+
jane.doe@example.org
|
150
156
|
file: "帶有電子郵件數據的.csv 文件"
|
151
157
|
info: '必須是一個 CSV 格式的文件,僅包含一列電子郵件地址:'
|
152
158
|
submit: 上傳檔案
|
@@ -171,11 +177,11 @@ zh-TW:
|
|
171
177
|
update: 更新
|
172
178
|
update:
|
173
179
|
error: 更新配置時發生問題。
|
174
|
-
success:
|
180
|
+
success: 配置成功更新。
|
175
181
|
confirmations:
|
176
182
|
create:
|
177
183
|
error: 驗證不符合。請再試一次或拒絕驗證,以便參與者進行修正。
|
178
|
-
success:
|
184
|
+
success: 參與者驗證成功.
|
179
185
|
new:
|
180
186
|
introduce_user_data: 輸入圖片中的數據
|
181
187
|
reject: 拒絕
|
@@ -183,7 +189,7 @@ zh-TW:
|
|
183
189
|
offline_confirmations:
|
184
190
|
create:
|
185
191
|
error: 驗證不符合。請再試一次或告知參與者進行修改。
|
186
|
-
success:
|
192
|
+
success: 參與者驗證成功.
|
187
193
|
new:
|
188
194
|
cancel: 取消
|
189
195
|
introduce_user_data: 輸入參與者電子郵件和文件資料
|
@@ -196,7 +202,7 @@ zh-TW:
|
|
196
202
|
verification_number: '驗證 #%{n}'
|
197
203
|
rejections:
|
198
204
|
create:
|
199
|
-
success:
|
205
|
+
success: 驗證被拒絕。參與者將被提示修改其文件。
|
200
206
|
authorizations:
|
201
207
|
choose:
|
202
208
|
choose_a_type: '請選擇您想要的驗證方式:'
|
@@ -210,16 +216,16 @@ zh-TW:
|
|
210
216
|
being_reviewed: 我們正在審核您的文件。您的身份驗證將很快完成。
|
211
217
|
offline: 使用離線驗證
|
212
218
|
online: 使用線上驗證
|
213
|
-
rejection_clarity:
|
214
|
-
rejection_correctness:
|
215
|
-
rejection_notice:
|
219
|
+
rejection_clarity: 請確認上傳的圖片中資訊清晰可見.
|
220
|
+
rejection_correctness: 請確認輸入資訊是否正確.
|
221
|
+
rejection_notice: 您的驗證出現問題。請再試一次。
|
216
222
|
send: 再次申請驗證
|
217
223
|
new:
|
218
224
|
send: 申請驗證
|
219
225
|
title: 上傳您的身份證件
|
220
226
|
update:
|
221
|
-
error:
|
222
|
-
success:
|
227
|
+
error: 重新上傳您的文件時發生問題.
|
228
|
+
success: 文件已成功重新上傳.
|
223
229
|
dni: DNI
|
224
230
|
nie: NIE
|
225
231
|
passport: 護照
|
@@ -236,26 +242,26 @@ zh-TW:
|
|
236
242
|
verification_code: 驗證碼
|
237
243
|
postages:
|
238
244
|
create:
|
239
|
-
error:
|
240
|
-
success:
|
245
|
+
error: 標記信函寄送時發生錯誤.
|
246
|
+
success: 信件已成功標記為已寄出.
|
241
247
|
authorizations:
|
242
248
|
create:
|
243
|
-
error:
|
244
|
-
success:
|
249
|
+
error: 您的請求發生問題.
|
250
|
+
success: 謝謝!我們會寄送一個驗證碼到您的地址.
|
245
251
|
edit:
|
246
252
|
send: 確認
|
247
253
|
title: 請輸入您收到的驗證碼。
|
248
|
-
waiting_for_letter:
|
254
|
+
waiting_for_letter: 我們將會儘快寄送一封信件到您的地址,附上驗證碼。
|
249
255
|
new:
|
250
256
|
send: 寄送信件給我
|
251
257
|
title: 重新申請驗證碼
|
252
258
|
update:
|
253
|
-
error:
|
259
|
+
error: 您的驗證碼與我們的不符。請再次檢查我們寄給您的信件.
|
254
260
|
success: 恭喜您!您已成功通過驗證。
|
255
261
|
sms:
|
256
262
|
authorizations:
|
257
263
|
create:
|
258
|
-
error:
|
264
|
+
error: 您的請求發生問題.
|
259
265
|
success: 感謝您!我們已經發送了一個SMS簡訊到您的手機。
|
260
266
|
destroy:
|
261
267
|
success: 驗證碼已成功重設。請重新輸入您的電話號碼。
|
@@ -5,7 +5,7 @@ module Decidim
|
|
5
5
|
class InvalidVerificationRoute < StandardError
|
6
6
|
def new(route:)
|
7
7
|
msg = <<~MSG
|
8
|
-
You specified a direct handler but you
|
8
|
+
You specified a direct handler but you are trying to use `#{route}`
|
9
9
|
which is only available for multi-step authorization workflows. Change
|
10
10
|
your workflow to define an engine with a `#{route}` route.
|
11
11
|
MSG
|
@@ -63,16 +63,16 @@ module Decidim
|
|
63
63
|
@manifest = manifest
|
64
64
|
end
|
65
65
|
|
66
|
-
delegate :key, :name, :fullname, :description, :type, to: :manifest
|
66
|
+
delegate :key, :name, :fullname, :description, :type, :icon, to: :manifest
|
67
67
|
|
68
68
|
#
|
69
69
|
# Main entry point for the verification engine
|
70
70
|
#
|
71
71
|
def root_path(redirect_url: nil)
|
72
72
|
if manifest.type == "direct"
|
73
|
-
decidim_verifications.new_authorization_path(redirect_params(handler: name, redirect_url:
|
73
|
+
decidim_verifications.new_authorization_path(redirect_params(handler: name, redirect_url:))
|
74
74
|
else
|
75
|
-
main_engine.send(:root_path, redirect_params(redirect_url:
|
75
|
+
main_engine.send(:root_path, redirect_params(redirect_url:))
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
@@ -84,7 +84,7 @@ module Decidim
|
|
84
84
|
raise InvalidVerificationRoute.new(route: "edit_authorization_path") if manifest.type == "direct"
|
85
85
|
raise MissingVerificationRoute.new(handler: name, route: "edit_authorization_path", action: "resume") unless main_engine.respond_to?(:edit_authorization_path)
|
86
86
|
|
87
|
-
main_engine.send(:edit_authorization_path, redirect_params(redirect_url:
|
87
|
+
main_engine.send(:edit_authorization_path, redirect_params(redirect_url:))
|
88
88
|
end
|
89
89
|
|
90
90
|
#
|
@@ -93,11 +93,11 @@ module Decidim
|
|
93
93
|
#
|
94
94
|
def renew_path(redirect_url: nil)
|
95
95
|
if manifest.type == "direct"
|
96
|
-
decidim_verifications.renew_authorizations_path(redirect_params(handler: name, redirect_url:
|
96
|
+
decidim_verifications.renew_authorizations_path(redirect_params(handler: name, redirect_url:))
|
97
97
|
else
|
98
98
|
raise MissingVerificationRoute.new(handler: name, route: "renew_authorization_path", action: "renew") unless main_engine.respond_to?(:renew_authorization_path)
|
99
99
|
|
100
|
-
main_engine.send(:renew_authorization_path, redirect_params(redirect_url:
|
100
|
+
main_engine.send(:renew_authorization_path, redirect_params(redirect_url:))
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
@@ -18,10 +18,11 @@ module Decidim
|
|
18
18
|
root to: "authorizations#new"
|
19
19
|
end
|
20
20
|
|
21
|
-
initializer "
|
21
|
+
initializer "decidim_verifications_sms.workflow" do |_app|
|
22
22
|
if Decidim.sms_gateway_service
|
23
23
|
Decidim::Verifications.register_workflow(:sms) do |workflow|
|
24
24
|
workflow.engine = Decidim::Verifications::Sms::Engine
|
25
|
+
workflow.icon = "message-3-line"
|
25
26
|
end
|
26
27
|
end
|
27
28
|
end
|
@@ -4,11 +4,12 @@ module Decidim
|
|
4
4
|
module Verifications
|
5
5
|
module Sms
|
6
6
|
class ExampleGateway
|
7
|
-
attr_reader :mobile_phone_number, :code
|
7
|
+
attr_reader :mobile_phone_number, :code, :context
|
8
8
|
|
9
|
-
def initialize(mobile_phone_number, code)
|
9
|
+
def initialize(mobile_phone_number, code, context = {})
|
10
10
|
@mobile_phone_number = mobile_phone_number
|
11
11
|
@code = code
|
12
|
+
@context = context
|
12
13
|
end
|
13
14
|
|
14
15
|
def deliver_code
|
@@ -21,7 +21,7 @@ module Decidim
|
|
21
21
|
#
|
22
22
|
# Note that whereas direct methods can be used for "on the fly"
|
23
23
|
# verification, deferred methods require the authorization status to be
|
24
|
-
# persisted into DB. That
|
24
|
+
# persisted into DB. That is the reason why only direct methods can be used
|
25
25
|
# for user impersonation, for example, since they require continuous "on the
|
26
26
|
# fly" verification by the impersonating user.
|
27
27
|
#
|
@@ -37,6 +37,7 @@ module Decidim
|
|
37
37
|
attribute :renewable, Boolean, default: true
|
38
38
|
attribute :time_between_renewals, ActiveSupport::Duration, default: 1.day
|
39
39
|
attribute :metadata_cell, String, default: "decidim/verifications/authorization_metadata"
|
40
|
+
attribute :icon, String
|
40
41
|
|
41
42
|
validate :engine_or_form
|
42
43
|
|
@@ -23,8 +23,8 @@ module Decidim
|
|
23
23
|
#
|
24
24
|
# Registers a new verification workflow using the workflow manifest API
|
25
25
|
#
|
26
|
-
def register_workflow(name, &
|
27
|
-
registry.register_workflow(name, &
|
26
|
+
def register_workflow(name, &)
|
27
|
+
registry.register_workflow(name, &)
|
28
28
|
end
|
29
29
|
|
30
30
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-verifications
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.28.0.rc4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Rodriguez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-core
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.28.0.rc4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.28.0.rc4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: decidim-admin
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.28.0.rc4
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.28.0.rc4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: decidim-dev
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.28.0.rc4
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.28.0.rc4
|
55
55
|
description: Several verification methods for your decidim instance
|
56
56
|
email:
|
57
57
|
- deivid.rodriguez@riseup.net
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- app/forms/decidim/verifications/postal_letter/postage_form.rb
|
106
106
|
- app/forms/decidim/verifications/sms/confirmation_form.rb
|
107
107
|
- app/forms/decidim/verifications/sms/mobile_phone_form.rb
|
108
|
+
- app/helpers/decidim/verifications/application_helper.rb
|
108
109
|
- app/jobs/decidim/verifications/csv_census/application_job.rb
|
109
110
|
- app/jobs/decidim/verifications/csv_census/remove_duplicates_job.rb
|
110
111
|
- app/models/decidim/verifications/application_record.rb
|
@@ -112,6 +113,8 @@ files:
|
|
112
113
|
- app/models/decidim/verifications/csv_census/data.rb
|
113
114
|
- app/models/decidim/verifications/csv_census/status.rb
|
114
115
|
- app/models/decidim/verifications/csv_datum.rb
|
116
|
+
- app/packs/entrypoints/decidim_verifications.js
|
117
|
+
- app/packs/stylesheets/verifications.scss
|
115
118
|
- app/presenters/decidim/verifications/id_documents/authorization_presenter.rb
|
116
119
|
- app/presenters/decidim/verifications/postal_letter/authorization_presenter.rb
|
117
120
|
- app/queries/decidim/verifications/authorizations.rb
|
@@ -119,7 +122,7 @@ files:
|
|
119
122
|
- app/services/decidim/authorization_handler.rb
|
120
123
|
- app/uploaders/decidim/cw/verifications/attachment_uploader.rb
|
121
124
|
- app/uploaders/decidim/verifications/attachment_uploader.rb
|
122
|
-
- app/views/decidim/verifications/authorizations/
|
125
|
+
- app/views/decidim/verifications/authorizations/_item.html.erb
|
123
126
|
- app/views/decidim/verifications/authorizations/first_login.html.erb
|
124
127
|
- app/views/decidim/verifications/authorizations/index.html.erb
|
125
128
|
- app/views/decidim/verifications/authorizations/new.html.erb
|
@@ -140,7 +143,8 @@ files:
|
|
140
143
|
- app/views/decidim/verifications/sms/authorizations/edit.html.erb
|
141
144
|
- app/views/decidim/verifications/sms/authorizations/new.html.erb
|
142
145
|
- app/views/dummy_authorization/_form.html.erb
|
143
|
-
-
|
146
|
+
- app/views/layouts/decidim/authorizations.html.erb
|
147
|
+
- config/assets.rb
|
144
148
|
- config/locales/am-ET.yml
|
145
149
|
- config/locales/ar-SA.yml
|
146
150
|
- config/locales/ar.yml
|
@@ -250,10 +254,15 @@ files:
|
|
250
254
|
- lib/decidim/verifications/version.rb
|
251
255
|
- lib/decidim/verifications/workflow_manifest.rb
|
252
256
|
- lib/decidim/verifications/workflows.rb
|
253
|
-
homepage: https://
|
257
|
+
homepage: https://decidim.org
|
254
258
|
licenses:
|
255
259
|
- AGPL-3.0
|
256
|
-
metadata:
|
260
|
+
metadata:
|
261
|
+
bug_tracker_uri: https://github.com/decidim/decidim/issues
|
262
|
+
documentation_uri: https://docs.decidim.org/
|
263
|
+
funding_uri: https://opencollective.com/decidim
|
264
|
+
homepage_uri: https://decidim.org
|
265
|
+
source_code_uri: https://github.com/decidim/decidim
|
257
266
|
post_install_message:
|
258
267
|
rdoc_options: []
|
259
268
|
require_paths:
|
@@ -262,14 +271,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
262
271
|
requirements:
|
263
272
|
- - ">="
|
264
273
|
- !ruby/object:Gem::Version
|
265
|
-
version: '3.
|
274
|
+
version: '3.1'
|
266
275
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
267
276
|
requirements:
|
268
|
-
- - "
|
277
|
+
- - ">"
|
269
278
|
- !ruby/object:Gem::Version
|
270
|
-
version:
|
279
|
+
version: 1.3.1
|
271
280
|
requirements: []
|
272
|
-
rubygems_version: 3.4.
|
281
|
+
rubygems_version: 3.4.20
|
273
282
|
signing_key:
|
274
283
|
specification_version: 4
|
275
284
|
summary: Decidim verifications module
|