decidim-verifications 0.31.8 → 0.31.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f0ac0c1f45842d5bb1d1fd3b2834e4331f665fe1dd695d5e1d8fbd8316a0ec0
4
- data.tar.gz: ef3a1596ec1fc37e9ea6c5a7d91eb4f3776f22ce7acc532e1dfb33e95f947d9c
3
+ metadata.gz: fbc582584c96b3d8cda37b79ede163717206ca05fbb7d643ed9a3aba640bc554
4
+ data.tar.gz: 1356000bc30c5501159af1d06011eceb606da792559640c32dc570868f9d023e
5
5
  SHA512:
6
- metadata.gz: 127d52242a65b9011ed240076cf48c01d74a07d873675d56c0705d98f5bf0ee3e05d6789ec938fc8867479590128d705c65843e5749050a20d36613cb802f5ff
7
- data.tar.gz: 5b7839ff8788b33e67b3e28aa6c6f726c34e19a264082626b128c7ecf1cb00593b67f6fd8df8a027a8b82514902a19b7ce280ffc730667c57a6f633375c8f3f0
6
+ metadata.gz: 2390a8e5a2bdabba4000c0259e1a9fef8d0a92b62f58632b7a60a41e0c3ea775cea656b8fe4ee6dba5b0f21b7e59b918f61e7be4ec1e0f8774125f790a3eeffc
7
+ data.tar.gz: b215ff69255da647e22446847a56360ea67b4faacb572b11f21c8fe5d84a63b567e477c175d96a7f458db8b069c096623085622e4dc6bb13d22cc0f048350057
@@ -81,14 +81,18 @@ module Decidim
81
81
  end
82
82
 
83
83
  def create_verification_conflict
84
- authorization = Decidim::Authorization.find_by(unique_id: handler.unique_id)
84
+ # rubocop:disable Decidim/OrganizationScopedFinder -- user: @organization.users scopes the lookup to the current organization
85
+ authorization = Decidim::Authorization.where(user: @organization.users).find_by(unique_id: handler.unique_id)
86
+ # rubocop:enable Decidim/OrganizationScopedFinder
85
87
  return if authorization.blank?
86
88
 
89
+ # rubocop:disable Decidim/OrganizationScopedFinder -- users are scoped to the current organization by the authorization lookup above
87
90
  conflict = Decidim::Verifications::Conflict.find_or_initialize_by(
88
91
  current_user: handler.user,
89
92
  managed_user: authorization.user,
90
93
  unique_id: handler.unique_id
91
94
  )
95
+ # rubocop:enable Decidim/OrganizationScopedFinder
92
96
 
93
97
  conflict.update(times: conflict.times + 1)
94
98
 
@@ -85,6 +85,7 @@ module Decidim
85
85
  end
86
86
 
87
87
  on(:transfer_user) do |authorized_user|
88
+ transfer_onboarding_action(current_user, authorized_user)
88
89
  authorized_user.update(last_sign_in_at: Time.current, deleted_at: nil)
89
90
  sign_out(current_user)
90
91
  sign_in(authorized_user)
@@ -197,8 +198,21 @@ module Decidim
197
198
 
198
199
  private
199
200
 
201
+ # Preserves the pending onboarding action of the transferring session on
202
+ # the user that takes over it, so the onboarding flow resumes the action
203
+ # the visitor was trying to complete (e.g. voting a budget) instead of the
204
+ # transferred user's stale action (e.g. a survey already answered).
205
+ def transfer_onboarding_action(from_user, to_user)
206
+ pending_action = from_user.extended_data[Decidim::OnboardingManager::DATA_KEY]
207
+ return if pending_action.blank?
208
+
209
+ to_user.update(
210
+ extended_data: to_user.extended_data.merge(Decidim::OnboardingManager::DATA_KEY => pending_action)
211
+ )
212
+ end
213
+
200
214
  def authorization
201
- @authorization ||= Decidim::Authorization.find_or_initialize_by(
215
+ @authorization ||= Decidim::Authorization.find_or_initialize_by( # rubocop:disable Decidim/OrganizationScopedFinder -- user is current_user, scoped to current_organization
202
216
  user: current_user,
203
217
  name: handler_name
204
218
  )
@@ -35,7 +35,7 @@ module Decidim
35
35
  end
36
36
 
37
37
  def load_authorization
38
- @authorization = Decidim::Authorization.find_or_initialize_by(
38
+ @authorization = Decidim::Authorization.find_or_initialize_by( # rubocop:disable Decidim/OrganizationScopedFinder -- user is current_user, scoped to current_organization
39
39
  user: current_user,
40
40
  name: "csv_census"
41
41
  )
@@ -86,7 +86,7 @@ module Decidim
86
86
  end
87
87
 
88
88
  def load_authorization
89
- @authorization = Decidim::Authorization.find_or_initialize_by(
89
+ @authorization = Decidim::Authorization.find_or_initialize_by( # rubocop:disable Decidim/OrganizationScopedFinder -- user is current_user, scoped to current_organization
90
90
  user: current_user,
91
91
  name: "id_documents"
92
92
  )
@@ -70,7 +70,7 @@ module Decidim
70
70
  end
71
71
 
72
72
  def load_authorization
73
- @authorization = Decidim::Authorization.find_or_initialize_by(
73
+ @authorization = Decidim::Authorization.find_or_initialize_by( # rubocop:disable Decidim/OrganizationScopedFinder -- user is current_user, scoped to current_organization
74
74
  user: current_user,
75
75
  name: "postal_letter"
76
76
  )
@@ -79,7 +79,7 @@ module Decidim
79
79
  private
80
80
 
81
81
  def authorization
82
- @authorization ||= Decidim::Authorization.find_or_initialize_by(
82
+ @authorization ||= Decidim::Authorization.find_or_initialize_by( # rubocop:disable Decidim/OrganizationScopedFinder -- user is current_user, scoped to current_organization
83
83
  user: current_user,
84
84
  name: "sms"
85
85
  )
@@ -10,7 +10,7 @@
10
10
 
11
11
  <% unless using_online? %>
12
12
  <div class="mb-12">
13
- <%= translated_attribute(current_organization.id_documents_explanation_text).html_safe %>
13
+ <%= decidim_sanitize_editor_admin(translated_attribute(current_organization.id_documents_explanation_text)) %>
14
14
  </div>
15
15
  <% end %>
16
16
 
@@ -4,7 +4,7 @@
4
4
  </h1>
5
5
  </div>
6
6
 
7
- <%= translated_attribute(current_organization.id_documents_explanation_text).html_safe unless using_online? %>
7
+ <%= decidim_sanitize_editor_admin(translated_attribute(current_organization.id_documents_explanation_text)) unless using_online? %>
8
8
 
9
9
  <%= decidim_form_for(@form, url: authorization_path) do |form| %>
10
10
  <%= render partial: "form", locals: { form: } %>
@@ -228,6 +228,7 @@ fi-pl:
228
228
  authorizations:
229
229
  new:
230
230
  error: Emme voineet vahvistaa tiliäsi, koska tietojasi ei löytynyt organisaation rekisteristä.
231
+ locked: Liian monta epäonnistunutta yritystä. Yritä myöhemmin uudelleen.
231
232
  success: Tilisi on vahvistettu onnistuneesti.
232
233
  dummy_authorization:
233
234
  extra_explanation:
@@ -253,6 +254,7 @@ fi-pl:
253
254
  confirmations:
254
255
  create:
255
256
  error: Vahvistustiedot eivät täsmää. Yritä uudestaan tai hylkää vahvistus, jolloin käyttäjä voi muuttaa sitä.
257
+ locked: Liian monta epäonnistunutta yritystä. Yritä myöhemmin uudelleen.
256
258
  success: Osallistujan vahvistaminen onnistui.
257
259
  new:
258
260
  introduce_user_data: Syötä kuvassa näkyvät tiedot
@@ -329,6 +331,7 @@ fi-pl:
329
331
  title: Pyydä vahvistuskoodia
330
332
  update:
331
333
  error: Vahvistuskoodi ei vastaa meidän koodiamme. Tarkista uudestaan kirje, jonka olemme lähettäneet sinulle.
334
+ locked: Liian monta epäonnistunutta yritystä. Yritä myöhemmin uudelleen.
332
335
  success: Onnittelut. Käyttäjätilisi vahvistaminen onnistui.
333
336
  sms:
334
337
  authorizations:
@@ -348,6 +351,8 @@ fi-pl:
348
351
  title: Pyydä vahvistuskoodia
349
352
  update:
350
353
  error: Vahvistuskoodi on virheellinen. Tarkista uudestaan tekstiviesti, jonka lähetimme sinulle.
354
+ expired: Vahvistuskoodi on vanhentunut. Pyydä uusi koodi.
355
+ locked: Liian monta epäonnistunutta yritystä. Yritä myöhemmin uudelleen tai pyydä uusi koodi.
351
356
  success: Onnittelut. Käyttäjätilisi vahvistaminen onnistui.
352
357
  errors:
353
358
  messages:
@@ -49,6 +49,7 @@ sk:
49
49
  confirm: Zrušenie autorizácií pred dátumom nie je možné vrátiť späť. Naozaj chcete pokračovať?
50
50
  confirm_all: Zrušenie všetkých autorizácií nie je možné vrátiť späť. Naozaj chcete pokračovať?
51
51
  destroy_nok: Pri rušení autorizácií sa vyskytol problém.
52
+ destroy_ok: Rušenie autorizácií prebieha. Dokončenie môže trvať niekoľko minút.
52
53
  info: Je tu celkovo %{count} overených účastníkov.
53
54
  no_data: Žiadni overení účastníci.
54
55
  title: Zrušenie autorizácií
@@ -227,6 +228,7 @@ sk:
227
228
  authorizations:
228
229
  new:
229
230
  error: Váš účet nebol overený, alebo nie ste v sčítanie organizácie.
231
+ locked: Príliš veľa neúspešných pokusov. Skúste to znova neskôr.
230
232
  success: Účet bol úspešne overený.
231
233
  dummy_authorization:
232
234
  extra_explanation:
@@ -256,6 +258,7 @@ sk:
256
258
  confirmations:
257
259
  create:
258
260
  error: Overenie sa nezhoduje. Skúste to znova alebo overenie zamietnite, aby ho účastník mohol opraviť.
261
+ locked: Príliš veľa neúspešných pokusov. Skúste to znova neskôr.
259
262
  success: Účastník bol úspešne overený.
260
263
  new:
261
264
  introduce_user_data: Zadajte údaje z obrázka
@@ -332,6 +335,7 @@ sk:
332
335
  title: Požiadajte o overovací kód
333
336
  update:
334
337
  error: Váš overovací kód sa nezhoduje s naším. Prosím, skontrolujte list, ktorý sme vám poslali.
338
+ locked: Príliš veľa neúspešných pokusov. Skúste to znova neskôr.
335
339
  success: Gratulujeme. Boli ste úspešne overení.
336
340
  sms:
337
341
  authorizations:
@@ -351,6 +355,8 @@ sk:
351
355
  title: Požiadajte o overovací kód
352
356
  update:
353
357
  error: Váš overovací kód sa nezhoduje s naším. Prosím, skontrolujte SMS, ktorú sme vám poslali.
358
+ expired: Platnosť overovacieho kódu vypršala. Požiadajte o nový.
359
+ locked: Príliš veľa neúspešných pokusov. Skúste to znova neskôr alebo požiadajte o nový kód.
354
360
  success: Gratulujeme. Boli ste úspešne overení.
355
361
  errors:
356
362
  messages:
@@ -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.31.8"
7
+ "0.31.9"
8
8
  end
9
9
  end
10
10
  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.31.8
4
+ version: 0.31.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rodriguez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-22 00:00:00.000000000 Z
11
+ date: 2026-11-23 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.31.8
19
+ version: 0.31.9
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.31.8
26
+ version: 0.31.9
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.31.8
33
+ version: 0.31.9
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.31.8
40
+ version: 0.31.9
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.31.8
47
+ version: 0.31.9
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.31.8
54
+ version: 0.31.9
55
55
  description: Several verification methods for your decidim instance
56
56
  email:
57
57
  - deivid.rodriguez@riseup.net