decidim-verifications 0.23.3 → 0.24.1
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.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/app/commands/decidim/verifications/authorize_user.rb +30 -1
- data/app/commands/decidim/verifications/csv_census/admin/create_census_data.rb +2 -0
- data/app/commands/decidim/verifications/id_documents/admin/confirm_user_offline_authorization.rb +2 -2
- data/app/controllers/decidim/verifications/id_documents/admin/pending_authorizations_controller.rb +1 -1
- data/app/events/decidim/verifications/managed_user_error_event.rb +39 -0
- data/app/forms/decidim/verifications/sms/mobile_phone_form.rb +1 -1
- data/app/models/decidim/verifications/conflict.rb +8 -0
- data/app/models/decidim/verifications/csv_census/data.rb +1 -0
- data/app/queries/decidim/verifications/authorizations.rb +3 -2
- data/app/queries/decidim/verifications/authorizations_before_date.rb +5 -7
- data/app/services/decidim/authorization_handler.rb +1 -1
- data/app/views/decidim/verifications/authorizations/index.html.erb +3 -3
- data/app/views/dummy_authorization/_form.html.erb +2 -2
- data/config/locales/ar.yml +0 -9
- data/config/locales/ca.yml +13 -5
- data/config/locales/cs.yml +35 -25
- data/config/locales/de.yml +14 -6
- data/config/locales/el.yml +0 -9
- data/config/locales/en.yml +14 -6
- data/config/locales/es-MX.yml +14 -6
- data/config/locales/es-PY.yml +14 -6
- data/config/locales/es.yml +14 -6
- data/config/locales/eu.yml +0 -9
- data/config/locales/fi-plain.yml +13 -5
- data/config/locales/fi.yml +13 -5
- data/config/locales/fr-CA.yml +13 -5
- data/config/locales/fr.yml +13 -5
- data/config/locales/gl.yml +14 -6
- data/config/locales/hu.yml +0 -8
- data/config/locales/id-ID.yml +0 -9
- data/config/locales/is-IS.yml +0 -3
- data/config/locales/it.yml +0 -9
- data/config/locales/ja.yml +0 -9
- data/config/locales/lv.yml +0 -9
- data/config/locales/nl.yml +10 -6
- data/config/locales/no.yml +0 -9
- data/config/locales/pl.yml +17 -7
- data/config/locales/pt-BR.yml +0 -9
- data/config/locales/pt.yml +0 -9
- data/config/locales/ro-RO.yml +15 -6
- data/config/locales/ru.yml +0 -3
- data/config/locales/sk.yml +0 -9
- data/config/locales/sv.yml +0 -9
- data/config/locales/tr-TR.yml +5 -9
- data/config/locales/uk.yml +0 -3
- data/config/locales/zh-CN.yml +0 -9
- data/db/migrate/20201028161118_create_decidim_verifications_conflicts.rb +15 -0
- data/lib/decidim/verifications/default_action_authorizer.rb +5 -5
- data/lib/decidim/verifications/test/factories.rb +7 -0
- data/lib/decidim/verifications/version.rb +1 -1
- metadata +13 -10
data/config/locales/sv.yml
CHANGED
@@ -34,16 +34,8 @@ sv:
|
|
34
34
|
confirm: Återkallande av auktorisering före datum kan inte ångras. Vill du fortsätta?
|
35
35
|
confirm_all: Det går inte att ångra återkallande av alla auktoriseringar. Vill du fortsätta?
|
36
36
|
destroy_nok: Det gick inte att återkalla auktoriseringar.
|
37
|
-
destroy_ok: Alla auktoriseringar som överensstämmer har återkallats!
|
38
37
|
info: Det finns totalt %{count} verifierade deltagare.
|
39
38
|
no_data: Inga verifierade deltagare
|
40
|
-
title: Återkallande av verifiering
|
41
|
-
authorization_workflows: Verifieringar
|
42
|
-
admin_log:
|
43
|
-
organization:
|
44
|
-
update_id_documents_config: "%{user_name} uppdaterade konfiguration för verifikation av identitetshandlingar"
|
45
|
-
user:
|
46
|
-
grant_id_documents_offline_verification: "%{user_name} verifierade %{resource_name} hjälp av offlineverifiering av identitetshandlingar"
|
47
39
|
authorization_handlers:
|
48
40
|
admin:
|
49
41
|
csv_census:
|
@@ -131,7 +123,6 @@ sv:
|
|
131
123
|
title: Aktuella medlemsuppgifter
|
132
124
|
instructions:
|
133
125
|
body: För att göra detta måste du öppna systemadministrationen och lägga till godkännande via csv_census till organisationen
|
134
|
-
title: Du måste aktivera medlemsuppgifter via CSV för organisationen
|
135
126
|
new:
|
136
127
|
file: ".csv-fil med e-postadresser"
|
137
128
|
info: 'Måste vara en fil i CSV-format med bara en kolumn med e-postadressen:'
|
data/config/locales/tr-TR.yml
CHANGED
@@ -34,16 +34,8 @@ tr:
|
|
34
34
|
confirm: Tarihten önce iptal yetkileri geri alınamaz. Devam etmek istediğine emin misin?
|
35
35
|
confirm_all: Tüm yetkilendirmeler geri alınamaz. Devam etmek istediğine emin misin?
|
36
36
|
destroy_nok: Yetkilendirmeler iptal edilirken bir sorun oluştu.
|
37
|
-
destroy_ok: Tüm eşleşen yetkiler başarıyla iptal edildi!
|
38
37
|
info: Toplam %{count} doğrulanmış katılımcı var.
|
39
38
|
no_data: Doğrulanmış katılımcı yok
|
40
|
-
title: Yetkinin iptali
|
41
|
-
authorization_workflows: Doğrulama
|
42
|
-
admin_log:
|
43
|
-
organization:
|
44
|
-
update_id_documents_config: "%{user_name}, Kimlik Belgeleri doğrulama yapılandırmasını güncelledi"
|
45
|
-
user:
|
46
|
-
grant_id_documents_offline_verification: "%{user_name}, çevrimdışı Kimlik Belgeleri doğrulaması kullanarak %{resource_name} öğesini doğruladı"
|
47
39
|
authorization_handlers:
|
48
40
|
admin:
|
49
41
|
csv_census:
|
@@ -75,6 +67,10 @@ tr:
|
|
75
67
|
postal_letter:
|
76
68
|
explanation: Size adresinizi doğrulayabilmemiz için girmeniz gereken bir kod içeren bir posta mektubu göndereceğiz.
|
77
69
|
name: Posta mektubu ile kod
|
70
|
+
events:
|
71
|
+
verifications:
|
72
|
+
verify_with_managed_user:
|
73
|
+
notification_title: Katılımcı <a href="%{resource_path}">%{resource_title} </a>, yönetilen katılımcının <a href="%{managed_user_path}">%{managed_user_name} </a> verileriyle kendini doğrulamaya çalıştı
|
78
74
|
verifications:
|
79
75
|
authorizations:
|
80
76
|
authorization_metadata:
|
@@ -131,7 +127,7 @@ tr:
|
|
131
127
|
title: Geçerli kayıt verisi
|
132
128
|
instructions:
|
133
129
|
body: Bunu yapmak için sistem yönetimine girmeli ve csv_census yetkilerini kuruluşa eklemelisiniz.
|
134
|
-
title: Bu kuruluş için
|
130
|
+
title: Bu kuruluş için CSV sayımını etkinleştirmeniz gerekiyor
|
135
131
|
new:
|
136
132
|
file: "e-posta verileri içeren .csv dosyası"
|
137
133
|
info: 'E-posta adresi içeren yalnızca bir sütuna sahip CSV biçiminde bir dosya olmalıdır:'
|
data/config/locales/uk.yml
CHANGED
data/config/locales/zh-CN.yml
CHANGED
@@ -34,16 +34,8 @@ zh-CN:
|
|
34
34
|
confirm: 在日期前撤销授权无法撤销。您确定要继续吗?
|
35
35
|
confirm_all: 撤销所有授权无法撤销。您确定要继续吗?
|
36
36
|
destroy_nok: 撤销授权时出现问题。
|
37
|
-
destroy_ok: 所有匹配的授权已成功取消!
|
38
37
|
info: 共有 %{count} 个已验证的参与者。
|
39
38
|
no_data: 没有经过验证的参与者
|
40
|
-
title: 验证已取消
|
41
|
-
authorization_workflows: 验证
|
42
|
-
admin_log:
|
43
|
-
organization:
|
44
|
-
update_id_documents_config: "%{user_name} 更新了身份文档验证配置"
|
45
|
-
user:
|
46
|
-
grant_id_documents_offline_verification: "%{user_name} 使用离线身份证件验证了 %{resource_name}"
|
47
39
|
authorization_handlers:
|
48
40
|
admin:
|
49
41
|
csv_census:
|
@@ -131,7 +123,6 @@ zh-CN:
|
|
131
123
|
title: 目前的普查数据
|
132
124
|
instructions:
|
133
125
|
body: 要做到这一点,您必须输入系统管理并将csv_census授权添加到组织
|
134
|
-
title: 您需要激活此组织的 csv 调查
|
135
126
|
new:
|
136
127
|
file: "带有电子邮件数据的.csv 文件"
|
137
128
|
info: '必须是 CSV 格式的文件,其中只有一个列有电子邮件地址:'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class CreateDecidimVerificationsConflicts < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
create_table :decidim_verifications_conflicts do |t|
|
6
|
+
t.references :current_user, index: { name: "authorization_current_user" }, foreign_key: { to_table: :decidim_users }
|
7
|
+
t.references :managed_user, index: { name: "authorization_managed_user" }, foreign_key: { to_table: :decidim_users }
|
8
|
+
t.integer :times, default: 0
|
9
|
+
t.string :unique_id
|
10
|
+
t.boolean :solved, default: false
|
11
|
+
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -42,15 +42,15 @@ module Decidim
|
|
42
42
|
#
|
43
43
|
def authorize
|
44
44
|
if !authorization
|
45
|
-
[:missing, action: :authorize]
|
45
|
+
[:missing, { action: :authorize }]
|
46
46
|
elsif authorization_expired?
|
47
|
-
[:expired, action: :authorize]
|
47
|
+
[:expired, { action: :authorize }]
|
48
48
|
elsif !authorization.granted?
|
49
|
-
[:pending, action: :resume]
|
49
|
+
[:pending, { action: :resume }]
|
50
50
|
elsif unmatched_fields.any?
|
51
|
-
[:unauthorized, fields: unmatched_fields]
|
51
|
+
[:unauthorized, { fields: unmatched_fields }]
|
52
52
|
elsif missing_fields.any?
|
53
|
-
[:incomplete, fields: missing_fields, action: :reauthorize, cancel: true]
|
53
|
+
[:incomplete, { fields: missing_fields, action: :reauthorize, cancel: true }]
|
54
54
|
else
|
55
55
|
[:ok, {}]
|
56
56
|
end
|
@@ -8,4 +8,11 @@ FactoryBot.define do
|
|
8
8
|
email { generate(:email) }
|
9
9
|
organization
|
10
10
|
end
|
11
|
+
|
12
|
+
factory :conflict, class: "Decidim::Verifications::Conflict" do
|
13
|
+
current_user { create(:user) }
|
14
|
+
managed_user { create(:user, managed: true) }
|
15
|
+
unique_id { "12345678X" }
|
16
|
+
times { 1 }
|
17
|
+
end
|
11
18
|
end
|
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.24.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Rodriguez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-08 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.24.1
|
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.24.1
|
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.24.1
|
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.24.1
|
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.24.1
|
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.24.1
|
55
55
|
description: Several verification methods for your decidim instance
|
56
56
|
email:
|
57
57
|
- deivid.rodriguez@riseup.net
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- app/controllers/decidim/verifications/postal_letter/admin/postages_controller.rb
|
92
92
|
- app/controllers/decidim/verifications/postal_letter/authorizations_controller.rb
|
93
93
|
- app/controllers/decidim/verifications/sms/authorizations_controller.rb
|
94
|
+
- app/events/decidim/verifications/managed_user_error_event.rb
|
94
95
|
- app/forms/decidim/verifications/admin/revocations_before_date_form.rb
|
95
96
|
- app/forms/decidim/verifications/csv_census/admin/census_data_form.rb
|
96
97
|
- app/forms/decidim/verifications/csv_census/census_form.rb
|
@@ -107,6 +108,7 @@ files:
|
|
107
108
|
- app/jobs/decidim/verifications/csv_census/application_job.rb
|
108
109
|
- app/jobs/decidim/verifications/csv_census/remove_duplicates_job.rb
|
109
110
|
- app/models/decidim/verifications/application_record.rb
|
111
|
+
- app/models/decidim/verifications/conflict.rb
|
110
112
|
- app/models/decidim/verifications/csv_census/data.rb
|
111
113
|
- app/models/decidim/verifications/csv_census/status.rb
|
112
114
|
- app/models/decidim/verifications/csv_datum.rb
|
@@ -207,6 +209,7 @@ files:
|
|
207
209
|
- config/locales/zh-TW.yml
|
208
210
|
- db/migrate/20171030133426_move_authorizations_to_new_api.rb
|
209
211
|
- db/migrate/20181227135423_create_decidim_verifications_csv_data.rb
|
212
|
+
- db/migrate/20201028161118_create_decidim_verifications_conflicts.rb
|
210
213
|
- lib/decidim/verifications.rb
|
211
214
|
- lib/decidim/verifications/adapter.rb
|
212
215
|
- lib/decidim/verifications/csv_census.rb
|
@@ -246,14 +249,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
246
249
|
requirements:
|
247
250
|
- - ">="
|
248
251
|
- !ruby/object:Gem::Version
|
249
|
-
version: '
|
252
|
+
version: '2.7'
|
250
253
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
251
254
|
requirements:
|
252
255
|
- - ">="
|
253
256
|
- !ruby/object:Gem::Version
|
254
257
|
version: '0'
|
255
258
|
requirements: []
|
256
|
-
rubygems_version: 3.
|
259
|
+
rubygems_version: 3.1.2
|
257
260
|
signing_key:
|
258
261
|
specification_version: 4
|
259
262
|
summary: Decidim verifications module
|