decidim-verifications 0.29.2 → 0.30.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/app/commands/decidim/verifications/authorize_user.rb +24 -0
  3. data/app/commands/decidim/verifications/revoke_by_name_authorizations.rb +51 -0
  4. data/app/controllers/decidim/verifications/authorizations_controller.rb +73 -16
  5. data/app/controllers/decidim/verifications/id_documents/authorizations_controller.rb +3 -1
  6. data/app/forms/decidim/verifications/sms/mobile_phone_form.rb +1 -1
  7. data/app/helpers/decidim/verifications/application_helper.rb +28 -0
  8. data/app/models/decidim/verifications/conflict.rb +8 -0
  9. data/app/services/decidim/authorization_handler.rb +22 -1
  10. data/app/views/decidim/verifications/authorizations/_tos_acceptance_field.html.erb +11 -0
  11. data/app/views/decidim/verifications/authorizations/index.html.erb +4 -4
  12. data/app/views/decidim/verifications/authorizations/new.html.erb +14 -6
  13. data/app/views/decidim/verifications/authorizations/onboarding_pending.html.erb +38 -0
  14. data/app/views/decidim/verifications/id_documents/authorizations/choose.html.erb +2 -2
  15. data/app/views/decidim/verifications/id_documents/authorizations/edit.html.erb +1 -1
  16. data/app/views/decidim/verifications/id_documents/authorizations/new.html.erb +1 -1
  17. data/app/views/decidim/verifications/postal_letter/authorizations/edit.html.erb +2 -2
  18. data/app/views/decidim/verifications/postal_letter/authorizations/new.html.erb +1 -1
  19. data/app/views/decidim/verifications/sms/authorizations/edit.html.erb +1 -1
  20. data/app/views/decidim/verifications/sms/authorizations/new.html.erb +1 -1
  21. data/app/views/dummy_authorization/_form.html.erb +0 -6
  22. data/app/views/layouts/decidim/authorizations.html.erb +34 -0
  23. data/config/locales/ar.yml +10 -21
  24. data/config/locales/bg.yml +21 -36
  25. data/config/locales/ca.yml +38 -35
  26. data/config/locales/cs.yml +38 -35
  27. data/config/locales/de.yml +38 -35
  28. data/config/locales/el.yml +8 -22
  29. data/config/locales/en.yml +18 -15
  30. data/config/locales/es-MX.yml +39 -36
  31. data/config/locales/es-PY.yml +39 -36
  32. data/config/locales/es.yml +38 -35
  33. data/config/locales/eu.yml +39 -36
  34. data/config/locales/fi-plain.yml +38 -35
  35. data/config/locales/fi.yml +38 -35
  36. data/config/locales/fr-CA.yml +34 -36
  37. data/config/locales/fr.yml +34 -36
  38. data/config/locales/gl.yml +8 -24
  39. data/config/locales/hu.yml +10 -25
  40. data/config/locales/id-ID.yml +8 -21
  41. data/config/locales/is-IS.yml +8 -16
  42. data/config/locales/it.yml +8 -24
  43. data/config/locales/ja.yml +38 -36
  44. data/config/locales/lt.yml +10 -25
  45. data/config/locales/lv.yml +8 -22
  46. data/config/locales/nl.yml +8 -24
  47. data/config/locales/no.yml +8 -24
  48. data/config/locales/pl.yml +21 -36
  49. data/config/locales/pt-BR.yml +8 -24
  50. data/config/locales/pt.yml +8 -24
  51. data/config/locales/ro-RO.yml +8 -24
  52. data/config/locales/ru.yml +8 -17
  53. data/config/locales/sk.yml +8 -22
  54. data/config/locales/sv.yml +21 -34
  55. data/config/locales/tr-TR.yml +8 -23
  56. data/config/locales/uk.yml +8 -17
  57. data/config/locales/zh-CN.yml +8 -25
  58. data/config/locales/zh-TW.yml +10 -25
  59. data/decidim-verifications.gemspec +1 -1
  60. data/lib/decidim/verifications/adapter.rb +1 -1
  61. data/lib/decidim/verifications/engine.rb +22 -1
  62. data/lib/decidim/verifications/version.rb +1 -1
  63. data/lib/decidim/verifications/workflow_manifest.rb +1 -0
  64. metadata +13 -11
  65. data/app/views/decidim/verifications/authorizations/first_login.html.erb +0 -21
@@ -36,16 +36,16 @@ zh-CN:
36
36
  admin:
37
37
  id_documents:
38
38
  help:
39
- - 用户填写其身份资料并上载其文件副本。
40
- - 您填写上传图片中的信息。
41
- - 信息应匹配用户填写的任何信息。
42
- -
39
+ - 用户填写其身份资料并上载其文件副本。
40
+ - 您填写上传图片中的信息。
41
+ - 信息应匹配用户填写的任何信息。
42
+ -
43
43
  postal_letter:
44
44
  help:
45
- - 参与者要求将验证码发送到他们的地址。
46
- - 你用验证码将信件发送到他们的地址。
47
- - 您将信件标记为已发送。
48
- - 一旦您将信件标记为发送,参与者将能够引入代码并获得验证。
45
+ - 参与者要求将验证码发送到他们的地址。
46
+ - 你用验证码将信件发送到他们的地址。
47
+ - 您将信件标记为已发送。
48
+ - 一旦您将信件标记为发送,参与者将能够引入代码并获得验证。
49
49
  csv_census:
50
50
  name: 本组织的人口普查情况
51
51
  direct: 直线
@@ -66,17 +66,6 @@ zh-CN:
66
66
  unconfirmed: 您需要确认您的电子邮件才能授权自己。
67
67
  destroy:
68
68
  error: 删除授权时出错。
69
- first_login:
70
- actions:
71
- another_dummy_authorization_handler: 验证另一个验证处理程序
72
- csv_census: 核查该组织的人口普查情况
73
- dummy_authorization_handler: 对照示例授权处理程序验证
74
- dummy_authorization_workflow: 对照示例授权工作流程验证
75
- id_documents: 通过上传您的身份证件获得验证
76
- postal_letter: 通过邮件接收验证码
77
- sms: 通过接收短信验证码获得验证
78
- title: 验证您的身份
79
- verify_with_these_options: '以下是验证您身份的可用选项:'
80
69
  index:
81
70
  expired_verification: 验证已过期
82
71
  pending_verification: 待验证
@@ -92,9 +81,6 @@ zh-CN:
92
81
  start_exploring: 开始探索中
93
82
  csv_census:
94
83
  admin:
95
- census:
96
- create:
97
- error: 导入普查时出错。
98
84
  destroy:
99
85
  title: 删除所有普查数据
100
86
  index:
@@ -111,9 +97,6 @@ zh-CN:
111
97
  new:
112
98
  error: 我们无法验证您的帐户或您不在组织的普查中。
113
99
  success: 您的帐户已成功验证。
114
- dummy_authorization:
115
- extra_explanation:
116
- scope: 仅限范围为 %{scope_name} 的参与者。
117
100
  id_documents:
118
101
  admin:
119
102
  config:
@@ -40,7 +40,6 @@ zh-TW:
40
40
  destroy:
41
41
  confirm: 撤銷在指定日期之前的授權無法撤消。您確定要繼續嗎?
42
42
  confirm_all: 撤銷所有授權後無法還原,確定要繼續嗎?
43
- destroy_nok: 撤銷授權時發生問題。
44
43
  destroy_ok: 所有匹配的授權已成功撤銷。
45
44
  info: 總共有 %{count} 名已驗證的參與者。
46
45
  no_data: 沒有經過驗證的參與者.
@@ -55,20 +54,20 @@ zh-TW:
55
54
  admin:
56
55
  csv_census:
57
56
  help:
58
- - 管理員上傳一個包含已接受參與者電子郵件的 CSV 檔案.
59
- - 只有在 CSV 檔案中的電子郵件被列出的參與者才能取得驗證。
57
+ - 管理員上傳一個包含已接受參與者電子郵件的 CSV 檔案.
58
+ - 只有在 CSV 檔案中的電子郵件被列出的參與者才能取得驗證。
60
59
  id_documents:
61
60
  help:
62
- - 使用者填寫身份資訊並上傳其證件的掃描副本。
63
- - 您填寫上傳圖像中的資訊。
64
- - 上傳的資訊應與使用者填寫的資訊相符。
65
- - 如果您無法清楚地看到該信息或無法進行驗證,您可以拒絕該請求,用戶將能夠修正它。
61
+ - 使用者填寫身份資訊並上傳其證件的掃描副本。
62
+ - 您填寫上傳圖像中的資訊。
63
+ - 上傳的資訊應與使用者填寫的資訊相符。
64
+ - 如果您無法清楚地看到該信息或無法進行驗證,您可以拒絕該請求,用戶將能夠修正它。
66
65
  postal_letter:
67
66
  help:
68
- - 參與者請求將驗證碼發送至其地址。
69
- - 您將信件連同驗證碼發送至其地址。
70
- - 您將信件標記為已發送。
71
- - 一旦您將信件標記為已發送,參與者便能輸入驗證碼並通過驗證。
67
+ - 參與者請求將驗證碼發送至其地址。
68
+ - 您將信件連同驗證碼發送至其地址。
69
+ - 您將信件標記為已發送。
70
+ - 一旦您將信件標記為已發送,參與者便能輸入驗證碼並通過驗證。
72
71
  csv_census:
73
72
  explanation: 使用組織人口普查的方式進行驗證.
74
73
  name: 組織的普查
@@ -100,17 +99,6 @@ zh-TW:
100
99
  destroy:
101
100
  error: 刪除授權時出現問題。
102
101
  success: 您已成功刪除授權。
103
- first_login:
104
- actions:
105
- another_dummy_authorization_handler: 使用另一個授權處理器進行驗證
106
- csv_census: 根據組織的人口統計進行驗證
107
- dummy_authorization_handler: 根據範例授權處理器進行驗證
108
- dummy_authorization_workflow: 根據範例授權工作流程進行驗證
109
- id_documents: 通過上傳身份證明文件進行驗證
110
- postal_letter: 通過郵寄獲得驗證碼進行驗證
111
- sms: 通過收到SMS短信驗證碼進行驗證
112
- title: 驗證你的身份
113
- verify_with_these_options: '這是可以驗證您身份的可用選項:'
114
102
  index:
115
103
  expired_verification: 驗證已過期
116
104
  granted_verification: 已授權驗證
@@ -133,7 +121,6 @@ zh-TW:
133
121
  admin:
134
122
  census:
135
123
  create:
136
- error: 匯入戶籍普查資料時發生錯誤。
137
124
  success: 成功匯入 %{count} 項目(%{errors} 錯誤).
138
125
  destroy_all:
139
126
  success: 所有戶籍數據都已刪除.
@@ -163,10 +150,8 @@ zh-TW:
163
150
  extra_explanation:
164
151
  postal_codes:
165
152
  other: "參與僅限於具有郵政編碼%{postal_codes} 的參與者。\n參與僅限於具有以下任何郵政編碼的參與者:%{postal_codes}。"
166
- scope: 參與資格限制於具有 %{scope_name} 范圍的參與者。
167
153
  user_postal_codes:
168
154
  other: "參與資格限制於具有郵政編碼 %{postal_codes} 的參與者,而您的郵政編碼為 %{user_postal_code}。\n參與資格限制於具有以下任一郵政編碼的參與者:%{postal_codes}。而您的郵政編碼為 %{user_postal_code}。"
169
- user_scope: 參與限制僅限於範圍為 %{scope_name} 的參與者,而您的範圍為 %{user_scope_name}。
170
155
  id_documents:
171
156
  admin:
172
157
  config:
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  "homepage_uri" => "https://decidim.org",
18
18
  "source_code_uri" => "https://github.com/decidim/decidim"
19
19
  }
20
- s.required_ruby_version = "~> 3.2.0"
20
+ s.required_ruby_version = "~> 3.3.0"
21
21
 
22
22
  s.summary = "Decidim verifications module"
23
23
  s.description = "Several verification methods for your decidim instance"
@@ -63,7 +63,7 @@ module Decidim
63
63
  @manifest = manifest
64
64
  end
65
65
 
66
- delegate :key, :name, :fullname, :description, :type, :icon, to: :manifest
66
+ delegate :key, :name, :fullname, :description, :type, :icon, :ephemeral?, to: :manifest
67
67
 
68
68
  #
69
69
  # Main entry point for the verification engine
@@ -12,9 +12,10 @@ module Decidim
12
12
  authenticate(:user) do
13
13
  resources :authorizations, only: [:new, :create, :index] do
14
14
  collection do
15
- get :first_login
15
+ get :onboarding_pending
16
16
  get :renew_modal
17
17
  get :renew
18
+ delete :clear_onboarding_data
18
19
  end
19
20
  end
20
21
 
@@ -23,6 +24,10 @@ module Decidim
23
24
  end
24
25
  end
25
26
 
27
+ resources :authorizations, only: nil do
28
+ post :renew_onboarding_data, on: :collection
29
+ end
30
+
26
31
  namespace :admin do
27
32
  # Revocations - Two options: 1) Revoke all (without params) 2) Revoke before date (when date params exist)
28
33
  post "verifications_before_date", to: "verifications#destroy_before_date", as: "verifications/destroy_before_date"
@@ -30,6 +35,22 @@ module Decidim
30
35
  end
31
36
  end
32
37
 
38
+ initializer "decidim_verifications.mount_routes" do
39
+ Decidim::Core::Engine.routes do
40
+ mount Decidim::Verifications::Engine, at: "/", as: "decidim_verifications"
41
+ end
42
+ end
43
+
44
+ initializer "decidim_verifications.mount_admin_routes" do
45
+ Decidim::Core::Engine.routes do
46
+ constraints(->(request) { Decidim::Admin::OrganizationDashboardConstraint.new(request).matches? }) do
47
+ Decidim.authorization_admin_engines.each do |manifest|
48
+ mount manifest.admin_engine, at: "/admin/#{manifest.name}", as: "decidim_admin_#{manifest.name}"
49
+ end
50
+ end
51
+ end
52
+ end
53
+
33
54
  # Initializer to include cells views paths
34
55
  initializer "decidim_verifications.add_cells_view_paths" do
35
56
  Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Verifications::Engine.root}/app/cells")
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-verifications version.
5
5
  module Verifications
6
6
  def self.version
7
- "0.29.2"
7
+ "0.30.0.rc1"
8
8
  end
9
9
  end
10
10
  end
@@ -38,6 +38,7 @@ module Decidim
38
38
  attribute :time_between_renewals, ActiveSupport::Duration, default: 1.day
39
39
  attribute :metadata_cell, String, default: "decidim/verifications/authorization_metadata"
40
40
  attribute :icon, String
41
+ attribute :ephemeral, Boolean, default: false
41
42
 
42
43
  validate :engine_or_form
43
44
 
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.29.2
4
+ version: 0.30.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rodriguez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-12 00:00:00.000000000 Z
11
+ date: 2025-02-18 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.29.2
19
+ version: 0.30.0.rc1
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.29.2
26
+ version: 0.30.0.rc1
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.29.2
33
+ version: 0.30.0.rc1
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.29.2
40
+ version: 0.30.0.rc1
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.29.2
47
+ version: 0.30.0.rc1
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.29.2
54
+ version: 0.30.0.rc1
55
55
  description: Several verification methods for your decidim instance
56
56
  email:
57
57
  - deivid.rodriguez@riseup.net
@@ -75,6 +75,7 @@ files:
75
75
  - app/commands/decidim/verifications/perform_authorization_step.rb
76
76
  - app/commands/decidim/verifications/revoke_all_authorizations.rb
77
77
  - app/commands/decidim/verifications/revoke_by_condition_authorizations.rb
78
+ - app/commands/decidim/verifications/revoke_by_name_authorizations.rb
78
79
  - app/controllers/concerns/decidim/admin/workflows_breadcrumb.rb
79
80
  - app/controllers/concerns/decidim/verifications/renewable.rb
80
81
  - app/controllers/decidim/verifications/admin/verifications_controller.rb
@@ -123,9 +124,10 @@ files:
123
124
  - app/services/decidim/authorization_handler.rb
124
125
  - app/uploaders/decidim/verifications/attachment_uploader.rb
125
126
  - app/views/decidim/verifications/authorizations/_item.html.erb
126
- - app/views/decidim/verifications/authorizations/first_login.html.erb
127
+ - app/views/decidim/verifications/authorizations/_tos_acceptance_field.html.erb
127
128
  - app/views/decidim/verifications/authorizations/index.html.erb
128
129
  - app/views/decidim/verifications/authorizations/new.html.erb
130
+ - app/views/decidim/verifications/authorizations/onboarding_pending.html.erb
129
131
  - app/views/decidim/verifications/authorizations/renew_modal.html.erb
130
132
  - app/views/decidim/verifications/csv_census/admin/census/index.html.erb
131
133
  - app/views/decidim/verifications/csv_census/admin/census/instructions.html.erb
@@ -275,14 +277,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
275
277
  requirements:
276
278
  - - "~>"
277
279
  - !ruby/object:Gem::Version
278
- version: 3.2.0
280
+ version: 3.3.0
279
281
  required_rubygems_version: !ruby/object:Gem::Requirement
280
282
  requirements:
281
283
  - - ">="
282
284
  - !ruby/object:Gem::Version
283
285
  version: '0'
284
286
  requirements: []
285
- rubygems_version: 3.4.10
287
+ rubygems_version: 3.5.11
286
288
  signing_key:
287
289
  specification_version: 4
288
290
  summary: Decidim verifications module
@@ -1,21 +0,0 @@
1
- <div class="text-center py-10">
2
- <h1 class="title-decorator inline-block text-left mb-12">
3
- <%= t("decidim.verifications.authorizations.first_login.title") %>
4
- </h1>
5
- <p class="text-lg text-gray-2 text-left">
6
- <%= t("decidim.verifications.authorizations.first_login.verify_with_these_options") %>
7
- </p>
8
- </div>
9
-
10
- <div class="space-y-4">
11
- <ul class="space-y-4">
12
- <% unauthorized_methods.each do |unauthorized_method| %>
13
- <li>
14
- <%= link_to t("decidim.verifications.authorizations.first_login.actions.#{unauthorized_method.key}"),
15
- unauthorized_method.root_path,
16
- class: "button button__sm button__transparent-secondary" %>
17
- </li>
18
- <% end %>
19
- </ul>
20
- <p class="prose prose-a:text-secondary"><%= t("decidim.verifications.authorizations.skip_verification", link: link_to(t("decidim.verifications.authorizations.start_exploring"), cta_button_path).html_safe).html_safe %>.</p>
21
- </div>