decidim-verifications 0.32.0.rc2 → 0.32.0.rc3

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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/app/commands/decidim/verifications/revoke_all_authorizations.rb +1 -14
  3. data/app/commands/decidim/verifications/revoke_authorizations_by_condition.rb +46 -0
  4. data/app/controllers/decidim/verifications/admin/verifications_controller.rb +1 -1
  5. data/app/jobs/decidim/verifications/revoke_all_authorizations_job.rb +30 -0
  6. data/app/jobs/decidim/verifications/revoke_authorizations_by_condition_job.rb +44 -0
  7. data/app/views/decidim/verifications/postal_letter/admin/pending_authorizations/index.html.erb +1 -1
  8. data/config/locales/bg.yml +0 -1
  9. data/config/locales/ca-IT.yml +1 -1
  10. data/config/locales/ca.yml +1 -1
  11. data/config/locales/cs.yml +0 -1
  12. data/config/locales/de.yml +0 -1
  13. data/config/locales/en.yml +1 -1
  14. data/config/locales/es-MX.yml +1 -1
  15. data/config/locales/es-PY.yml +1 -1
  16. data/config/locales/es.yml +1 -1
  17. data/config/locales/eu.yml +3 -3
  18. data/config/locales/fi-plain.yml +1 -1
  19. data/config/locales/fi.yml +1 -1
  20. data/config/locales/fr-CA.yml +1 -1
  21. data/config/locales/fr.yml +1 -1
  22. data/config/locales/gl.yml +0 -1
  23. data/config/locales/hu.yml +0 -1
  24. data/config/locales/it.yml +0 -1
  25. data/config/locales/ja.yml +0 -1
  26. data/config/locales/lt.yml +0 -1
  27. data/config/locales/nl.yml +0 -1
  28. data/config/locales/no.yml +0 -1
  29. data/config/locales/pl.yml +0 -1
  30. data/config/locales/pt-BR.yml +0 -1
  31. data/config/locales/pt.yml +0 -1
  32. data/config/locales/ro-RO.yml +0 -1
  33. data/config/locales/sk.yml +0 -1
  34. data/config/locales/sv.yml +0 -1
  35. data/config/locales/zh-TW.yml +0 -1
  36. data/decidim-verifications.gemspec +1 -1
  37. data/lib/decidim/verifications/version.rb +1 -1
  38. metadata +10 -8
  39. data/app/commands/decidim/verifications/revoke_by_condition_authorizations.rb +0 -68
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a089621f508e213d6a183ad2303add7d32b6d86882b0694dc19f3e2b6c4a876
4
- data.tar.gz: 7261ba41f5f9668526f69d3e9d0566ee6b3122a43e69272ba3e2607394083620
3
+ metadata.gz: e2d704f232ec2bc96e3f887845658dda68e119508e801c7cfba67adfbd24f5e8
4
+ data.tar.gz: 49ce182d4c717e210d2a18186860d671273dbff679432da08c2875e53d8c1f10
5
5
  SHA512:
6
- metadata.gz: fc79c6a29d55bac55c9fdfa0bea5b1c4f1f2bc55f73cf74bd498df70c2c46a44340c9f0f4dc375d8f8d29e437197133557823a29087d8bf5faa3d9f7b850d2ae
7
- data.tar.gz: 1312888f79644951dae97a4dec8bc9b503944e8dfc3fb1e600f215470efaa95224eee55cb850723ae0ed5c40c276608042707de9d4628c1412de3c1942e3d1ca
6
+ metadata.gz: 5f7749039ce48ec823f1e138054a4f3bb3653bda408cb01839d9a3c2621aace0ab61ffcb9ab79e858d674d72c8f753ee5df78799c21e6fc29b9dc20aefb7f311
7
+ data.tar.gz: c5380104280f53885875a5594ec249dd952ddd1e10d8d220d472341f95eeab851cbbbd9bf7327964401eecbd8890390282188aa8f228cb1237f9abd6c318f882
@@ -22,20 +22,7 @@ module Decidim
22
22
  def call
23
23
  return broadcast(:invalid) unless @organization
24
24
 
25
- auths = Decidim::Verifications::Authorizations.new(
26
- organization:,
27
- granted: true
28
- ).query
29
-
30
- auths.find_each do |auth|
31
- Decidim.traceability.perform_action!(
32
- :destroy,
33
- auth,
34
- current_user
35
- ) do
36
- auth.destroy
37
- end
38
- end
25
+ RevokeAllAuthorizationsJob.perform_later(organization, current_user)
39
26
 
40
27
  broadcast(:ok)
41
28
  end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Verifications
5
+ # A command to revoke authorizations with filter
6
+ class RevokeAuthorizationsByCondition < Decidim::Command
7
+ delegate :current_user, to: :form
8
+ # Initializes the command.
9
+ #
10
+ # @param organization [Decidim::Organization] The organization where authorizations will be revoked
11
+ # @param form [Decidim::Verifications::RevocationsBeforeDateForm] A form object with the verification data to confirm it
12
+ def initialize(organization, form)
13
+ @organization = organization
14
+ @form = form
15
+ end
16
+
17
+ # Executes the command. Broadcasts these events:
18
+ #
19
+ # - :ok when everything is valid.
20
+ # - :invalid if the handler was not valid and we could not proceed.
21
+ #
22
+ # Returns nothing.
23
+ def call
24
+ return broadcast(:invalid) unless @organization
25
+ return broadcast(:invalid) unless @form.valid?
26
+
27
+ if @form.before_date.present?
28
+ RevokeAuthorizationsByConditionJob.perform_later(
29
+ organization,
30
+ current_user,
31
+ @form.before_date,
32
+ @form.impersonated_only?
33
+ )
34
+
35
+ broadcast(:ok)
36
+ else
37
+ broadcast(:invalid)
38
+ end
39
+ end
40
+
41
+ private
42
+
43
+ attr_reader :organization, :form
44
+ end
45
+ end
46
+ end
@@ -9,7 +9,7 @@ module Decidim
9
9
  return unless params.has_key?(:revocations_before_date)
10
10
 
11
11
  form = RevocationsBeforeDateForm.from_params(params[:revocations_before_date])
12
- RevokeByConditionAuthorizations.call(current_organization, form) do
12
+ RevokeAuthorizationsByCondition.call(current_organization, form) do
13
13
  on(:ok) do
14
14
  flash[:notice] = t("authorization_revocation.destroy_ok", scope: "decidim.admin.menu")
15
15
  redirect_to decidim_admin.authorization_workflows_url
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Verifications
5
+ class RevokeAllAuthorizationsJob < Decidim::ApplicationJob
6
+ queue_as :default
7
+
8
+ # Revokes every granted authorization for the given organization.
9
+ #
10
+ # @param organization [Decidim::Organization] The organization whose authorizations will be revoked
11
+ # @param current_user [Decidim::User] the current user.
12
+ def perform(organization, current_user)
13
+ auths = Decidim::Verifications::Authorizations.new(
14
+ organization:,
15
+ granted: true
16
+ ).query.includes(transfers: :records)
17
+
18
+ auths.find_each do |auth|
19
+ Decidim.traceability.perform_action!(
20
+ :destroy,
21
+ auth,
22
+ current_user
23
+ ) do
24
+ auth.destroy
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Verifications
5
+ class RevokeAuthorizationsByConditionJob < Decidim::ApplicationJob
6
+ queue_as :default
7
+
8
+ # Revokes the organization's granted authorizations created before
9
+ # the given date, optionally limited to impersonated users only.
10
+ #
11
+ # @param organization [Decidim::Organization] The organization whose authorizations will be revoked
12
+ # @param current_user [Decidim::User] the current user.
13
+ # @param before_date [Date] Only authorizations created before this date are revoked
14
+ # @param impersonated_only [Boolean] When true, only impersonated users' authorizations are revoked
15
+ def perform(organization, current_user, before_date, impersonated_only)
16
+ authorizations_to_revoke = if impersonated_only
17
+ Decidim::Verifications::AuthorizationsBeforeDate.new(
18
+ organization:,
19
+ date: before_date,
20
+ granted: true,
21
+ impersonated_only:
22
+ )
23
+ else
24
+ Decidim::Verifications::AuthorizationsBeforeDate.new(
25
+ organization:,
26
+ date: before_date,
27
+ granted: true
28
+ )
29
+ end
30
+
31
+ auths = authorizations_to_revoke.query.includes(transfers: :records)
32
+ auths.find_each do |auth|
33
+ Decidim.traceability.perform_action!(
34
+ :destroy,
35
+ auth,
36
+ current_user
37
+ ) do
38
+ auth.destroy
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -44,7 +44,7 @@
44
44
  <li class="dropdown__item">
45
45
  <% if authorization.letter_sent? %>
46
46
  <div class="dropdown__button-disabled">
47
- <%= with_tooltip t(".already_sent") do %>
47
+ <%= with_tooltip t(".already_sent"), class: :left do %>
48
48
  <%= icon "checkbox-circle-line", class: "text-gray" %>
49
49
  <span>
50
50
  <%= t(".mark_as_sent") %>
@@ -44,7 +44,6 @@ bg:
44
44
  destroy:
45
45
  confirm: Отмяната на разрешенията преди определена дата, не може да бъде възстановено. Сигурни ли сте, че искате да продължите?
46
46
  confirm_all: Отмяната на всички разрешения, не може да бъде възстановено. Сигурни ли сте, че искате да продължите?
47
- destroy_ok: Всички съвпадащи оторизации бяха отменени успешно.
48
47
  info: Има общо %{count} потвърдени участници.
49
48
  no_data: Няма потвърдени участници.
50
49
  title: Оторизации за отмяна
@@ -49,7 +49,7 @@ ca-IT:
49
49
  confirm: La revocació d'autoritzacions anteriors a aquesta data no es pot desfer. Segur que vols continuar?
50
50
  confirm_all: La revocació de totes les autoritzacions no es pot desfer. Segur que vols continuar?
51
51
  destroy_nok: S'ha produït un error en revocar les autoritzacions.
52
- destroy_ok: Totes les autoritzacions coincidents s'han revocat correctament.
52
+ destroy_ok: S'estan revocant les autoritzacions. Aquest procés pot trigar uns minuts a completar-se.
53
53
  info: Hi ha un total de %{count} participants verificades.
54
54
  no_data: No hi ha participants verificades.
55
55
  title: Revocació d'autoritzacions
@@ -49,7 +49,7 @@ ca:
49
49
  confirm: La revocació d'autoritzacions anteriors a aquesta data no es pot desfer. Segur que vols continuar?
50
50
  confirm_all: La revocació de totes les autoritzacions no es pot desfer. Segur que vols continuar?
51
51
  destroy_nok: S'ha produït un error en revocar les autoritzacions.
52
- destroy_ok: Totes les autoritzacions coincidents s'han revocat correctament.
52
+ destroy_ok: S'estan revocant les autoritzacions. Aquest procés pot trigar uns minuts a completar-se.
53
53
  info: Hi ha un total de %{count} participants verificades.
54
54
  no_data: No hi ha participants verificades.
55
55
  title: Revocació d'autoritzacions
@@ -49,7 +49,6 @@ cs:
49
49
  confirm: Zrušení před datem autorizace nelze vrátit zpět. Jste si jisti, že chcete pokračovat?
50
50
  confirm_all: Zrušení všech autorizací nelze vrátit zpět. Jste si jisti, že chcete pokračovat?
51
51
  destroy_nok: Při odebírání autorizací došlo k chybě.
52
- destroy_ok: Všechny odpovídající autorizace byly úspěšně zrušeny.
53
52
  info: Celkem je %{count} ověřených účastníků.
54
53
  no_data: Žádní ověření účastníci.
55
54
  title: Zrušení autorizace
@@ -49,7 +49,6 @@ de:
49
49
  confirm: Das Entziehen aller Berechtigungen vor einem Datum kann nicht rückgängig gemacht werden. Sind Sie sicher, dass Sie fortfahren möchten?
50
50
  confirm_all: Das Entziehen aller Berechtigungen nicht rückgängig gemacht werden. Sind Sie sicher, dass Sie fortfahren möchten?
51
51
  destroy_nok: Beim Entziehen der Berechtigungen ist ein Fehler aufgetreten.
52
- destroy_ok: Alle übereinstimmenden Berechtigungen wurden erfolgreich entzogen.
53
52
  info: Es gibt insgesamt %{count} verifizierte Teilnehmer.
54
53
  no_data: Keine verifizierten Teilnehmer.
55
54
  title: Berechtigungen widerrufen
@@ -49,7 +49,7 @@ en:
49
49
  confirm: Revoke before date authorizations cannot be undone. Are you sure you want to continue?
50
50
  confirm_all: Revoke all the authorizations cannot be undone. Are you sure you want to continue?
51
51
  destroy_nok: There was a problem while revoking authorizations.
52
- destroy_ok: All matched authorizations have been revocated successfully.
52
+ destroy_ok: Revocation of authorizations is in progress. This may take a few minutes to complete.
53
53
  info: There are a total of %{count} verified participants.
54
54
  no_data: No verified participants.
55
55
  title: Authorizations revocation
@@ -49,7 +49,7 @@ es-MX:
49
49
  confirm: La revocación de las autorizaciones anteriores a esta fecha no se puede deshacer. ¿Seguro que quieres continuar?
50
50
  confirm_all: La revocación de todas las autorizaciones no se puede deshacer. ¿Seguro que quieres continuar?
51
51
  destroy_nok: Se ha producido un error al revocar las autorizaciones.
52
- destroy_ok: Todas las autorizaciones coincidentes han sido revocadas con éxito.
52
+ destroy_ok: La revocación de las autorizaciones está en curso. Esto puede tardar unos minutos en completarse.
53
53
  info: Hay un total de %{count} participantes verificadas.
54
54
  no_data: No hay participantes verificadas.
55
55
  title: Revocación de autorizaciones
@@ -49,7 +49,7 @@ es-PY:
49
49
  confirm: La revocación de las autorizaciones anteriores a esta fecha no se puede deshacer. ¿Seguro que quieres continuar?
50
50
  confirm_all: La revocación de todas las autorizaciones no se puede deshacer. ¿Seguro que quieres continuar?
51
51
  destroy_nok: Se ha producido un error al revocar las autorizaciones.
52
- destroy_ok: Todas las autorizaciones coincidentes han sido revocadas con éxito.
52
+ destroy_ok: La revocación de las autorizaciones está en curso. Esto puede tardar unos minutos en completarse.
53
53
  info: Hay un total de %{count} participantes verificadas.
54
54
  no_data: No hay participantes verificadas.
55
55
  title: Revocación de autorizaciones
@@ -49,7 +49,7 @@ es:
49
49
  confirm: La revocación de las autorizaciones anteriores a esta fecha no se puede deshacer. ¿Seguro que quieres continuar?
50
50
  confirm_all: La revocación de todas las autorizaciones no se puede deshacer. ¿Seguro que quieres continuar?
51
51
  destroy_nok: Se ha producido un error al revocar las autorizaciones.
52
- destroy_ok: Todas las autorizaciones coincidentes han sido revocadas con éxito.
52
+ destroy_ok: La revocación de las autorizaciones está en curso. Esto puede tardar unos minutos en completarse.
53
53
  info: Hay un total de %{count} participantes verificadas.
54
54
  no_data: No hay participantes verificadas.
55
55
  title: Revocación de autorizaciones
@@ -18,7 +18,7 @@ eu:
18
18
  document_type: Dokumentu mota
19
19
  id_document_upload:
20
20
  document_number: Dokumentuaren zenbakia (letraz)
21
- document_type: Dokumentuaren mota
21
+ document_type: Dokumentu mota
22
22
  user: Parte-hartzaileak
23
23
  verification_attachment: Zure dokumentuaren eskaneatutako kopia
24
24
  mobile_phone:
@@ -49,7 +49,7 @@ eu:
49
49
  confirm: Data horren aurreko baimenak baliogabetzea ezin da desegin. Ziur zaude jarraitu nahi duzula?
50
50
  confirm_all: Baimen guztiak baliogabetzea ezin da desegin. Ziur zaude jarraitu nahi duzula?
51
51
  destroy_nok: Arazo bat izn da baimenak ezeztatzean.
52
- destroy_ok: Bat datozen baimen guztiak zuzen ezeztatu dira.
52
+ destroy_ok: Baimenak ezeztatzen ari dira. Minutu batzuk beharko ditugu hau bukatzeko.
53
53
  info: Guztira %{count} parte-hartzaile egiaztatuta daude.
54
54
  no_data: Ez dago parte-hartzaile egiaztaturik.
55
55
  title: Baimenak ezeztatzea
@@ -246,7 +246,7 @@ eu:
246
246
  config:
247
247
  edit:
248
248
  title: Nortasun agirien konfigurazioa
249
- update: eguneratzearen
249
+ update: Eguneratu
250
250
  update:
251
251
  error: Arazo bat egon da konfigurazioa eguneratzean.
252
252
  success: Ezarpena zuzen eguneratua.
@@ -49,7 +49,7 @@ fi-pl:
49
49
  confirm: Ennen valittua päivämäärää tehtyjen vahvistustietojen tuhoamista ei voi peruuttaa. Haluatko varmasti jatkaa?
50
50
  confirm_all: Vahvistusten tuhoamista ei voi peruuttaa. Haluatko varmasti jatkaa?
51
51
  destroy_nok: Vahvistusten kumoaminen epäonnistui.
52
- destroy_ok: Kaikki hakua vastanneiden tunnistautumiset on peruutettu onnistuneesti.
52
+ destroy_ok: Tunnistautumisten kumoaminen on käynnissä. Tämän valmistuminen voi kestää useamman minuutin ajan.
53
53
  info: Yhteensä %{count} varmennettua osallistujaa.
54
54
  no_data: Ei vahvistettuja osallistujia.
55
55
  title: Tunnistautumisten peruuttaminen
@@ -49,7 +49,7 @@ fi:
49
49
  confirm: Ennen valittua päivämäärää tehtyjen vahvistustietojen kumoamista ei voi perua. Haluatko varmasti jatkaa?
50
50
  confirm_all: Vahvistusten kumoamista ei voi perua. Haluatko varmasti jatkaa?
51
51
  destroy_nok: Vahvistusten kumoaminen epäonnistui.
52
- destroy_ok: Kaikkien hakua vastanneiden tunnistautumisten kumoaminen onnistui.
52
+ destroy_ok: Tunnistautumisten kumoaminen on käynnissä. Tämän valmistuminen voi kestää useamman minuutin ajan.
53
53
  info: Yhteensä %{count} vahvistettua osallistujaa.
54
54
  no_data: Ei vahvistettuja osallistujia.
55
55
  title: Tunnistautumisten kumoaminen
@@ -49,7 +49,7 @@ fr-CA:
49
49
  confirm: Révoquer avant la date d'autorisation ne peut pas être annulée. Êtes-vous sûr de vouloir continuer ?
50
50
  confirm_all: La révocation des autorisations ne peut être annulée. Êtes-vous sur de vouloir continuer?
51
51
  destroy_nok: Une erreur s'est produite lors de la révocation des autorisations.
52
- destroy_ok: Toutes les autorisations correspondantes ont été annulées avec succès.
52
+ destroy_ok: La révocation des autorisations est en cours. Cela peut prendre quelques minutes.
53
53
  info: Il y a un total de %{count} participants vérifiés.
54
54
  no_data: Aucun participant vérifié.
55
55
  title: Révocation des autorisations
@@ -49,7 +49,7 @@ fr:
49
49
  confirm: Révoquer avant la date d'autorisation ne peut pas être annulée. Êtes-vous sûr de vouloir continuer ?
50
50
  confirm_all: La révocation des autorisations ne peut être annulée. Êtes-vous sur de vouloir continuer?
51
51
  destroy_nok: Une erreur s'est produite lors de la révocation des autorisations.
52
- destroy_ok: Toutes les autorisations correspondantes ont été révoquées avec succès.
52
+ destroy_ok: La révocation des autorisations est en cours. Cela peut prendre quelques minutes.
53
53
  info: Il y a un total de %{count} participants vérifiés.
54
54
  no_data: Aucun participant vérifié.
55
55
  title: Révocation des autorisations
@@ -31,7 +31,6 @@ gl:
31
31
  before_date_info: Útil se o proceso ten comezado e queres rexeitar os permisos do proceso anterior.
32
32
  button: Rexeitar todo
33
33
  button_before: Rexeitar antes da data
34
- destroy_ok: Todas as autorizacións coincidentes foron revogadas con éxito.
35
34
  info: Hai un total de %{count} participantes verificados.
36
35
  title: Revogación de autorización
37
36
  authorization_workflows: Autorizacións
@@ -40,7 +40,6 @@ hu:
40
40
  destroy:
41
41
  confirm: A dátum előtti engedélyek visszavonása nem vonható vissza. Biztos, hogy folytatni szeretné?
42
42
  confirm_all: Az összes jogosultság visszavonása nem vonható vissza. Biztos, hogy folytatni szeretné?
43
- destroy_ok: Az összes egyező engedélyt sikeresen visszavonták.
44
43
  info: Összesen %{count} ellenőrzött résztvevő.
45
44
  no_data: Nincsenek ellenőrzött résztvevők.
46
45
  title: Engedélyezés és visszavonás
@@ -31,7 +31,6 @@ it:
31
31
  before_date_info: Utile se il processo è già iniziato e si desidera revocare i permessi del processo precedente.
32
32
  button: Revoca tutto
33
33
  button_before: Revoca prima della data
34
- destroy_ok: Tutte le autorizzazioni corrispondenti sono state revocate correttamente.
35
34
  info: Ci sono un totale di %{count} partecipanti verificati.
36
35
  title: Revoca delle autorizzazioni
37
36
  authorization_workflows: Autorizzazioni
@@ -49,7 +49,6 @@ ja:
49
49
  confirm: 指定日以前の認証の取り消しはやり直すことができません。続行してもよろしいですか?
50
50
  confirm_all: すべての権限を取り消すと、元に戻すことができません。本当に続行しますか?
51
51
  destroy_nok: 認証の取り消し中に問題が発生しました。
52
- destroy_ok: すべての一致した認証が正常に取り消されました。
53
52
  info: '%{count} 人の確認済み参加者がいます。'
54
53
  no_data: 検証済みの参加者はいません。
55
54
  title: 認証の取り消し方法
@@ -44,7 +44,6 @@ lt:
44
44
  destroy:
45
45
  confirm: Atšaukus leidimus iki datos, veiksmo nebus galima anuliuoti. Ar tikrai norite tęsti?
46
46
  confirm_all: Atšaukus visus leidimus, veiksmo nebus galima anuliuoti. Ar tikrai norite tęsti?
47
- destroy_ok: Visi sutampantys leidimai atšaukti.
48
47
  info: Bendras patvirtintų dalyvių skaičius – %{count}.
49
48
  no_data: Patvirtintų dalyvių nėra.
50
49
  title: Įgaliojimų atėmimas
@@ -31,7 +31,6 @@ nl:
31
31
  before_date_info: Nuttig als het proces al is begonnen en u de machtigingen van het vorige proces wilt intrekken.
32
32
  button: Alles intrekken
33
33
  button_before: Intrekken voor datum
34
- destroy_ok: Alle overeenkomstige autorisaties zijn ingetrokken.
35
34
  info: Er zijn een totaal van %{count} geverifieerde deelnemers.
36
35
  title: Autorisaties intrekken
37
36
  authorization_workflows: Authorisaties
@@ -31,7 +31,6 @@
31
31
  before_date_info: Nyttig hvis prosessen allerede har begynt og du vil tilbakekalle tillatelsene for den forrige prosessen.
32
32
  button: Opphev alle
33
33
  button_before: Tilbakekall før dato
34
- destroy_ok: Alle matchede autorisasjoner er nå tilbakekallet.
35
34
  info: Det er totalt %{count} bekreftede deltakere.
36
35
  title: Tilbakekall av autorisasjoner
37
36
  authorization_workflows: Autorisasjoner
@@ -44,7 +44,6 @@ pl:
44
44
  destroy:
45
45
  confirm: Unieważnienie przed autoryzacjami dat nie może zostać cofnięte. Czy na pewno chcesz kontynuować?
46
46
  confirm_all: Unieważnienie wszystkich autoryzacji nie może zostać cofnięte. Czy na pewno chcesz kontynuować?
47
- destroy_ok: Pomyślnie wycofano wszystkie autoryzacje spełniające kryteria.
48
47
  info: 'Całkowita liczba zweryfikowanych użytkowników: %{count}.'
49
48
  no_data: Brak zweryfikowanych uczestników.
50
49
  title: Wycofanie autoryzacji
@@ -49,7 +49,6 @@ pt-BR:
49
49
  confirm: Revogar antes da data as autorizações não podem ser desfeitas. Tem certeza que deseja continuar?
50
50
  confirm_all: Revogar todas as autorizações não podem ser desfeito. Tem certeza que deseja continuar?
51
51
  destroy_nok: Ocorreu um problema ao revogar as autorizações.
52
- destroy_ok: Todas as autorizações correspondentes foram revogadas com sucesso.
53
52
  info: Há um total de %{count} participantes verificados.
54
53
  no_data: Nenhum participante verificado.
55
54
  title: Revogação de Autorizações
@@ -31,7 +31,6 @@ pt:
31
31
  before_date_info: Útil caso o processo já tenha sido iniciado e pretenda revogar as permissões do processo anterior.
32
32
  button: Revogar tudo
33
33
  button_before: Revogar antes de data
34
- destroy_ok: Todas as autorizações correspondentes foram revogadas com êxito.
35
34
  info: Existe um total de %{count} participantes verificados.
36
35
  title: Revogação de autorizações
37
36
  authorization_workflows: Autorizações
@@ -37,7 +37,6 @@ ro:
37
37
  before_date_info: Este util dacă procesul a început deja și dorești să revoci drepturile procesului anterior.
38
38
  button: Revocați toate autorizările
39
39
  button_before: Revocați toate autorizările înainte de data
40
- destroy_ok: Toate autorizațiile corelate au fost revocate.
41
40
  info: Există un total de %{count} participanți verificați.
42
41
  title: Revocarea autorizațiilor
43
42
  authorization_workflows: Autorizări
@@ -49,7 +49,6 @@ 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: Všetky zhodné autorizácie boli úspešne zrušené.
53
52
  info: Je tu celkovo %{count} overených účastníkov.
54
53
  no_data: Žiadni overení účastníci.
55
54
  title: Zrušenie autorizácií
@@ -49,7 +49,6 @@ sv:
49
49
  confirm: Återkallande av auktorisering före datum kan inte ångras. Vill du fortsätta?
50
50
  confirm_all: Återkallande av auktorisering kan inte ångras. Vill du fortsätta?
51
51
  destroy_nok: Det gick inte att återkalla auktoriseringen.
52
- destroy_ok: Alla matchade auktoriseringar har återkallats.
53
52
  info: Det finns totalt %{count} verifierade deltagare.
54
53
  no_data: Inga verifierade deltagare.
55
54
  title: Återkallande av auktoriseringar
@@ -40,7 +40,6 @@ zh-TW:
40
40
  destroy:
41
41
  confirm: 撤銷在指定日期之前的授權無法撤消。您確定要繼續嗎?
42
42
  confirm_all: 撤銷所有授權後無法還原,確定要繼續嗎?
43
- destroy_ok: 所有匹配的授權已成功撤銷。
44
43
  info: 總共有 %{count} 名已驗證的參與者。
45
44
  no_data: 沒有經過驗證的參與者.
46
45
  title: 授權撤銷
@@ -3,7 +3,7 @@
3
3
  $LOAD_PATH.push File.expand_path("lib", __dir__)
4
4
 
5
5
  Gem::Specification.new do |s|
6
- version = "0.32.0.rc2"
6
+ version = "0.32.0.rc3"
7
7
  s.version = version
8
8
  s.authors = ["David Rodriguez"]
9
9
  s.email = ["deivid.rodriguez@riseup.net"]
@@ -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.32.0.rc2"
7
+ "0.32.0.rc3"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-verifications
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.0.rc2
4
+ version: 0.32.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rodriguez
@@ -15,42 +15,42 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 0.32.0.rc2
18
+ version: 0.32.0.rc3
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 0.32.0.rc2
25
+ version: 0.32.0.rc3
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: decidim-admin
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - '='
31
31
  - !ruby/object:Gem::Version
32
- version: 0.32.0.rc2
32
+ version: 0.32.0.rc3
33
33
  type: :development
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - '='
38
38
  - !ruby/object:Gem::Version
39
- version: 0.32.0.rc2
39
+ version: 0.32.0.rc3
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: decidim-dev
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - '='
45
45
  - !ruby/object:Gem::Version
46
- version: 0.32.0.rc2
46
+ version: 0.32.0.rc3
47
47
  type: :development
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - '='
52
52
  - !ruby/object:Gem::Version
53
- version: 0.32.0.rc2
53
+ version: 0.32.0.rc3
54
54
  description: Several verification methods for your decidim instance
55
55
  email:
56
56
  - deivid.rodriguez@riseup.net
@@ -75,7 +75,7 @@ files:
75
75
  - app/commands/decidim/verifications/id_documents/admin/update_config.rb
76
76
  - app/commands/decidim/verifications/perform_authorization_step.rb
77
77
  - app/commands/decidim/verifications/revoke_all_authorizations.rb
78
- - app/commands/decidim/verifications/revoke_by_condition_authorizations.rb
78
+ - app/commands/decidim/verifications/revoke_authorizations_by_condition.rb
79
79
  - app/commands/decidim/verifications/revoke_by_name_authorizations.rb
80
80
  - app/controllers/concerns/decidim/admin/workflows_breadcrumb.rb
81
81
  - app/controllers/concerns/decidim/verifications/admin/filterable.rb
@@ -115,6 +115,8 @@ files:
115
115
  - app/helpers/decidim/verifications/application_helper.rb
116
116
  - app/jobs/decidim/verifications/csv_census/application_job.rb
117
117
  - app/jobs/decidim/verifications/csv_census/process_census_data_job.rb
118
+ - app/jobs/decidim/verifications/revoke_all_authorizations_job.rb
119
+ - app/jobs/decidim/verifications/revoke_authorizations_by_condition_job.rb
118
120
  - app/models/decidim/verifications/application_record.rb
119
121
  - app/models/decidim/verifications/conflict.rb
120
122
  - app/models/decidim/verifications/csv_census/data.rb
@@ -1,68 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module Verifications
5
- # A command to revoke authorizations with filter
6
- class RevokeByConditionAuthorizations < Decidim::Command
7
- delegate :current_user, to: :form
8
- # Public: Initializes the command.
9
- #
10
- # organization - Organization object.
11
- # current_user - The current user.
12
- # form - A form object with the verification data to confirm it.
13
- def initialize(organization, form)
14
- @organization = organization
15
- @form = form
16
- end
17
-
18
- # Executes the command. Broadcasts these events:
19
- #
20
- # - :ok when everything is valid.
21
- # - :invalid if the handler was not valid and we could not proceed.
22
- #
23
- # Returns nothing.
24
- def call
25
- return broadcast(:invalid) unless @organization
26
- return broadcast(:invalid) unless @form.valid?
27
-
28
- # Check before date
29
- if @form.before_date.present?
30
- authorizations_to_revoke = if @form.impersonated_only?
31
- Decidim::Verifications::AuthorizationsBeforeDate.new(
32
- organization:,
33
- date: @form.before_date,
34
- granted: true,
35
- impersonated_only: @form.impersonated_only
36
- )
37
- else
38
- Decidim::Verifications::AuthorizationsBeforeDate.new(
39
- organization:,
40
- date: @form.before_date,
41
- granted: true
42
- )
43
- end
44
-
45
- auths = authorizations_to_revoke.query
46
- auths.find_each do |auth|
47
- Decidim.traceability.perform_action!(
48
- :destroy,
49
- auth,
50
- current_user
51
- ) do
52
- auth.destroy
53
- end
54
- end
55
-
56
- broadcast(:ok)
57
-
58
- else
59
- broadcast(:invalid)
60
- end
61
- end
62
-
63
- private
64
-
65
- attr_reader :organization, :form
66
- end
67
- end
68
- end