decidim-verifications 0.26.0 → 0.27.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/app/commands/decidim/verifications/authorize_user.rb +4 -3
  4. data/app/commands/decidim/verifications/confirm_user_authorization.rb +1 -1
  5. data/app/commands/decidim/verifications/csv_census/admin/create_census_data.rb +1 -1
  6. data/app/commands/decidim/verifications/destroy_user_authorization.rb +1 -1
  7. data/app/commands/decidim/verifications/id_documents/admin/confirm_user_offline_authorization.rb +1 -1
  8. data/app/commands/decidim/verifications/id_documents/admin/update_config.rb +1 -1
  9. data/app/commands/decidim/verifications/perform_authorization_step.rb +1 -1
  10. data/app/commands/decidim/verifications/revoke_all_authorizations.rb +1 -1
  11. data/app/commands/decidim/verifications/revoke_by_condition_authorizations.rb +1 -1
  12. data/app/controllers/decidim/verifications/application_controller.rb +1 -1
  13. data/app/controllers/decidim/verifications/authorizations_controller.rb +13 -3
  14. data/app/controllers/decidim/verifications/id_documents/authorizations_controller.rb +0 -2
  15. data/app/controllers/decidim/verifications/postal_letter/authorizations_controller.rb +0 -2
  16. data/app/events/decidim/verifications/managed_user_error_event.rb +5 -1
  17. data/app/forms/decidim/verifications/id_documents/upload_form.rb +1 -1
  18. data/app/queries/decidim/verifications/authorizations.rb +1 -1
  19. data/app/queries/decidim/verifications/authorizations_before_date.rb +1 -1
  20. data/app/services/decidim/authorization_handler.rb +2 -2
  21. data/app/views/decidim/verifications/authorizations/index.html.erb +5 -5
  22. data/config/locales/am-ET.yml +1 -0
  23. data/config/locales/ar.yml +1 -0
  24. data/config/locales/bg.yml +1 -0
  25. data/config/locales/ca.yml +5 -1
  26. data/config/locales/cs.yml +5 -1
  27. data/config/locales/da.yml +1 -0
  28. data/config/locales/de.yml +1 -4
  29. data/config/locales/el.yml +1 -0
  30. data/config/locales/en.yml +5 -2
  31. data/config/locales/eo.yml +1 -0
  32. data/config/locales/es-MX.yml +5 -1
  33. data/config/locales/es-PY.yml +5 -1
  34. data/config/locales/es.yml +5 -1
  35. data/config/locales/et.yml +1 -0
  36. data/config/locales/eu.yml +1 -4
  37. data/config/locales/fi-plain.yml +5 -1
  38. data/config/locales/fi.yml +6 -2
  39. data/config/locales/fr-CA.yml +5 -1
  40. data/config/locales/fr.yml +5 -1
  41. data/config/locales/ga-IE.yml +1 -0
  42. data/config/locales/gl.yml +1 -4
  43. data/config/locales/hr.yml +1 -0
  44. data/config/locales/hu.yml +1 -0
  45. data/config/locales/id-ID.yml +1 -0
  46. data/config/locales/is-IS.yml +2 -1
  47. data/config/locales/it.yml +5 -1
  48. data/config/locales/ja.yml +5 -1
  49. data/config/locales/ko.yml +1 -0
  50. data/config/locales/lb.yml +1 -0
  51. data/config/locales/lt.yml +1 -0
  52. data/config/locales/lv.yml +1 -0
  53. data/config/locales/mt.yml +1 -0
  54. data/config/locales/nl.yml +2 -1
  55. data/config/locales/no.yml +1 -4
  56. data/config/locales/om-ET.yml +1 -0
  57. data/config/locales/pl.yml +1 -4
  58. data/config/locales/pt-BR.yml +2 -5
  59. data/config/locales/pt.yml +1 -4
  60. data/config/locales/ro-RO.yml +1 -4
  61. data/config/locales/ru.yml +1 -0
  62. data/config/locales/si-LK.yml +1 -0
  63. data/config/locales/sk.yml +1 -0
  64. data/config/locales/sl.yml +1 -0
  65. data/config/locales/so-SO.yml +1 -0
  66. data/config/locales/sr-CS.yml +1 -0
  67. data/config/locales/sv.yml +1 -0
  68. data/config/locales/sw-KE.yml +1 -0
  69. data/config/locales/ti-ER.yml +1 -0
  70. data/config/locales/tr-TR.yml +1 -4
  71. data/config/locales/uk.yml +1 -0
  72. data/config/locales/val-ES.yml +1 -0
  73. data/config/locales/vi.yml +1 -0
  74. data/config/locales/zh-CN.yml +1 -0
  75. data/config/locales/zh-TW.yml +1 -0
  76. data/lib/decidim/verifications/sms/example_gateway.rb +1 -1
  77. data/lib/decidim/verifications/version.rb +1 -1
  78. data/lib/decidim/verifications/workflow_manifest.rb +6 -6
  79. metadata +12 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ee7945251d337d924058f58bc23e57313d185197033365d31e1a3dc0942aea9
4
- data.tar.gz: 4f24450e8c792bf524bde9ad16c11201d13aae20ece409d555e757f7258a20eb
3
+ metadata.gz: 1ee5a37d18af70ffb55bacdb53806094fc921e3a0f09f78e765efa9f671facc0
4
+ data.tar.gz: f5aeefc51841d4bd7614bf565f4b2b92b123fe8b56c0cac84e820b5ac9a1c4bb
5
5
  SHA512:
6
- metadata.gz: dc1a2fa436600b8d287f7fe740cee1ecad8aac3f017812af1c4fa1d3e1958b1983a9c978903503344db75d26aa17cbecaeaf3c1c5143e551f212df12bf9950f4
7
- data.tar.gz: 84460be71764709177de3914c6b931ae328a94bfabed2153f573ca070bd36b270454623bb986f90ecc88c1cbd916990014d2f205d6064ea4c4c32ffd4f2270e1
6
+ metadata.gz: 40d2c5f336f2ee77eac41990e0afabc76c5bb62bf64d6ae40b56ce8f14d9dfcc2a479ccf6e141c86eb71ed6d92f6cd8b717c147602504f18d740c60830be5105
7
+ data.tar.gz: c245dcd709dd8b5c2e153cf50fdf2745ce1add022070b76b2881d1d30dcdd604b446b713e2ef75686832af974a6640ac58bda2f249fe3930e153c484919e369b
data/README.md CHANGED
@@ -43,7 +43,7 @@ Decidim implements two type of authorization methods:
43
43
 
44
44
  * _Form authorizations_.
45
45
 
46
- When your verification method is simple enough, you can use a `Rectify::Form`
46
+ When your verification method is simple enough, you can use a `Decidim::Form`
47
47
  to implement it. "Simple" here means that the authorization can be granted
48
48
  with the submission of a single form. For example, to validate a user against
49
49
  a census API you will need a form with some fields that your users will use to
@@ -150,7 +150,7 @@ Decidim::Verifications.register_workflow(:my_workflow) do |workflow|
150
150
  end
151
151
  ```
152
152
 
153
- The format of the options you can define is the standard for a virtus attribute,
153
+ The format of the options you can define is the standard for a Decidim attribute,
154
154
  plus an additional `required` (true by default) option were you can choose
155
155
  whether the option is compulsory when configuring the workflow as a permission
156
156
  for an action or not.
@@ -3,12 +3,13 @@
3
3
  module Decidim
4
4
  module Verifications
5
5
  # A command to authorize a user with an authorization handler.
6
- class AuthorizeUser < Rectify::Command
6
+ class AuthorizeUser < Decidim::Command
7
7
  # Public: Initializes the command.
8
8
  #
9
9
  # handler - An AuthorizationHandler object.
10
- def initialize(handler)
10
+ def initialize(handler, organization)
11
11
  @handler = handler
12
+ @organization = organization
12
13
  end
13
14
 
14
15
  # Executes the command. Broadcasts these events:
@@ -39,7 +40,7 @@ module Decidim
39
40
  event: "decidim.events.verifications.managed_user_error_event",
40
41
  event_class: Decidim::Verifications::ManagedUserErrorEvent,
41
42
  resource: conflict,
42
- affected_users: Decidim::User.where(admin: true)
43
+ affected_users: @organization.admins
43
44
  )
44
45
  end
45
46
 
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Verifications
5
5
  # A command to confirm a previous partial authorization.
6
- class ConfirmUserAuthorization < Rectify::Command
6
+ class ConfirmUserAuthorization < Decidim::Command
7
7
  # Number of failed confirmation attempts before throttling.
8
8
  MAX_FAILED_ATTEMPTS = 2
9
9
 
@@ -6,7 +6,7 @@ module Decidim
6
6
  module Admin
7
7
  # A command with the business logic to create census data for a
8
8
  # organization.
9
- class CreateCensusData < Rectify::Command
9
+ class CreateCensusData < Decidim::Command
10
10
  def initialize(form, organization)
11
11
  @form = form
12
12
  @organization = organization
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Verifications
5
5
  # A command to Destroy the Authorization of a user.
6
- class DestroyUserAuthorization < Rectify::Command
6
+ class DestroyUserAuthorization < Decidim::Command
7
7
  def initialize(authorization)
8
8
  @authorization = authorization
9
9
  end
@@ -5,7 +5,7 @@ module Decidim
5
5
  module IdDocuments
6
6
  module Admin
7
7
  # A command to confirm a previous partial offline authorization.
8
- class ConfirmUserOfflineAuthorization < Rectify::Command
8
+ class ConfirmUserOfflineAuthorization < Decidim::Command
9
9
  # Public: Initializes the command.
10
10
  #
11
11
  # form - A form object with the verification data to confirm it.
@@ -4,7 +4,7 @@ module Decidim
4
4
  module Verifications
5
5
  module IdDocuments
6
6
  module Admin
7
- class UpdateConfig < Rectify::Command
7
+ class UpdateConfig < Decidim::Command
8
8
  def initialize(form)
9
9
  @form = form
10
10
  end
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Verifications
5
5
  # A command to create a partial authorization for a user.
6
- class PerformAuthorizationStep < Rectify::Command
6
+ class PerformAuthorizationStep < Decidim::Command
7
7
  # Public: Initializes the command.
8
8
  #
9
9
  # authorization - An Authorization object.
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Verifications
5
5
  # A command to revoke authorizations
6
- class RevokeAllAuthorizations < Rectify::Command
6
+ class RevokeAllAuthorizations < Decidim::Command
7
7
  # Public: Initializes the command.
8
8
  #
9
9
  # organization - Organization object.
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Verifications
5
5
  # A command to revoke authorizations with filter
6
- class RevokeByConditionAuthorizations < Rectify::Command
6
+ class RevokeByConditionAuthorizations < Decidim::Command
7
7
  # Public: Initializes the command.
8
8
  #
9
9
  # organization - Organization object.
@@ -22,7 +22,7 @@ module Decidim
22
22
  private
23
23
 
24
24
  def confirmed_user
25
- return true if !current_user || current_user && current_user.verifiable?
25
+ return true if !current_user || (current_user && current_user.verifiable?)
26
26
 
27
27
  redirect_back(
28
28
  fallback_location: root_path,
@@ -35,7 +35,7 @@ module Decidim
35
35
  end
36
36
 
37
37
  def create
38
- AuthorizeUser.call(handler) do
38
+ AuthorizeUser.call(handler, current_organization) do
39
39
  on(:ok) do
40
40
  flash[:notice] = t("authorizations.create.success", scope: "decidim.verifications")
41
41
  redirect_to redirect_url || authorizations_path
@@ -71,9 +71,19 @@ module Decidim
71
71
  def valid_handler
72
72
  return true if handler
73
73
 
74
- logger.warn "Invalid authorization handler given: #{handler_name} doesn't"\
75
- "exist or you haven't added it to `Decidim.authorization_handlers`"
74
+ msg = <<-MSG
75
+ Invalid authorization handler given: #{handler_name} doesn't
76
+ exist or you haven't added it to `Decidim.authorization_handlers.
76
77
 
78
+ Make sure this name matches with your registrations:\n\n
79
+ Decidim::Verifications.register_workflow(:#{handler_name}) do
80
+ ...
81
+ end
82
+ MSG
83
+
84
+ raise msg if Rails.env.development?
85
+
86
+ logger.warn msg
77
87
  redirect_to(authorizations_path) && (return false)
78
88
  end
79
89
 
@@ -77,11 +77,9 @@ module Decidim
77
77
 
78
78
  private
79
79
 
80
- # rubocop:disable Naming/MemoizedInstanceVariableName
81
80
  def authorization
82
81
  @authorization_presenter ||= AuthorizationPresenter.new(@authorization)
83
82
  end
84
- # rubocop:enable Naming/MemoizedInstanceVariableName
85
83
 
86
84
  def load_authorization
87
85
  @authorization = Decidim::Authorization.find_or_initialize_by(
@@ -60,11 +60,9 @@ module Decidim
60
60
 
61
61
  private
62
62
 
63
- # rubocop:disable Naming/MemoizedInstanceVariableName
64
63
  def authorization
65
64
  @authorization_presenter ||= AuthorizationPresenter.new(@authorization)
66
65
  end
67
- # rubocop:enable Naming/MemoizedInstanceVariableName
68
66
 
69
67
  def load_authorization
70
68
  @authorization = Decidim::Authorization.find_or_initialize_by(
@@ -3,12 +3,16 @@
3
3
  module Decidim
4
4
  module Verifications
5
5
  class ManagedUserErrorEvent < Decidim::Events::SimpleEvent
6
+ include Rails.application.routes.mounted_helpers
7
+
6
8
  delegate :profile_path, :profile_url, :name, to: :updated_user
7
9
 
8
10
  def i18n_scope
9
11
  "decidim.events.verifications.verify_with_managed_user"
10
12
  end
11
13
 
14
+ delegate :conflicts_path, to: :decidim_admin
15
+
12
16
  def resource_path
13
17
  profile_path
14
18
  end
@@ -22,7 +26,7 @@ module Decidim
22
26
  end
23
27
 
24
28
  def default_i18n_options
25
- super.merge({ managed_user_path: managed_user.profile_path, managed_user_name: managed_user.name })
29
+ super.merge({ conflicts_path: conflicts_path, managed_user_path: managed_user.profile_path, managed_user_name: managed_user.name })
26
30
  end
27
31
 
28
32
  private
@@ -8,7 +8,7 @@ module Decidim
8
8
  class UploadForm < InformationForm
9
9
  mimic :id_document_upload
10
10
 
11
- attribute :verification_attachment, String
11
+ attribute :verification_attachment
12
12
 
13
13
  validates :verification_attachment,
14
14
  passthru: { to: Decidim::Authorization },
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Verifications
5
5
  # Finds authorizations by different criteria
6
- class Authorizations < Rectify::Query
6
+ class Authorizations < Decidim::Query
7
7
  # Initializes the class.
8
8
  #
9
9
  # @param organization [Organization] The organization where this authorization belongs to
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Verifications
5
5
  # Finds authorizations by different criteria
6
- class AuthorizationsBeforeDate < Rectify::Query
6
+ class AuthorizationsBeforeDate < Decidim::Query
7
7
  # Initializes the class.
8
8
  #
9
9
  # @param organization [Organization] The organization where this authorization belongs to
@@ -29,12 +29,12 @@ module Decidim
29
29
  nil
30
30
  end
31
31
 
32
- # THe attributes of the handler that should be exposed as form input when
32
+ # The attributes of the handler that should be exposed as form input when
33
33
  # rendering the handler in a form.
34
34
  #
35
35
  # Returns an Array of Strings.
36
36
  def form_attributes
37
- attributes.except(:id, :user).keys
37
+ attributes.except("id", "user").keys
38
38
  end
39
39
 
40
40
  # The String partial path so Rails can render the handler as a form. This
@@ -7,14 +7,14 @@
7
7
  <% if @granted_authorizations.any? %>
8
8
  <div class="card card--list">
9
9
  <% @granted_authorizations.each do |authorization| %>
10
- <% if authorization.expired? %>
11
- <%= link_to authorization_method(authorization).root_path(**url_params), title: t(".expired_verification"), class: "card--list__item" do %>
12
- <% render partial: "granted_authorization", locals: { authorization: authorization } %>
13
- <% end %>
14
- <% elsif authorization.renewable? %>
10
+ <% if authorization.renewable? %>
15
11
  <%= link_to "#", title: t(".show_renew_info"), data: { open: "renew-modal", "open-url": renew_modal_authorizations_path(handler: authorization.name) }, class: "card--list__item authorization-renewable" do %>
16
12
  <%= render partial: "granted_authorization", locals: { authorization: authorization } %>
17
13
  <% end %>
14
+ <% elsif authorization.expired? %>
15
+ <%= link_to authorization_method(authorization).root_path(**url_params), title: t(".expired_verification"), class: "card--list__item" do %>
16
+ <% render partial: "granted_authorization", locals: { authorization: authorization } %>
17
+ <% end %>
18
18
  <% else %>
19
19
  <div class="card--list__item">
20
20
  <%= render partial: "granted_authorization", locals: { authorization: authorization } %>
@@ -1 +1,2 @@
1
+ ---
1
2
  am:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ar:
2
3
  activemodel:
3
4
  attributes:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  bg:
2
3
  activemodel:
3
4
  attributes:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ca:
2
3
  activemodel:
3
4
  attributes:
@@ -78,7 +79,10 @@ ca:
78
79
  events:
79
80
  verifications:
80
81
  verify_with_managed_user:
81
- notification_title: La participant <a href="%{resource_path}">%{resource_title}</a> ha intentat verificar-se amb les dades de la participant gestionada <a href="%{managed_user_path}">%{managed_user_name}</a>
82
+ email_intro: La participant <a href="%{resource_path}">%{resource_title}</a> ha intentat verificar-se amb les dades de la participant gestionada <a href="%{managed_user_path}">%{managed_user_name}</a>.
83
+ email_outro: Comprova la <a href="%{conflicts_path}">llista de conflictes de verificacions</a> i posa't en contacte amb la participant per a verificar els seus detalls i resoldre el problema.
84
+ email_subject: Error a l'intentar verificar-se contra una participant gestionada
85
+ notification_title: La participant <a href="%{resource_path}">%{resource_title}</a> ha intentat verificar-se amb les dades de la participant gestionada <a href="%{managed_user_path}">%{managed_user_name}</a>.
82
86
  verifications:
83
87
  authorizations:
84
88
  authorization_metadata:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  cs:
2
3
  activemodel:
3
4
  attributes:
@@ -78,7 +79,10 @@ cs:
78
79
  events:
79
80
  verifications:
80
81
  verify_with_managed_user:
81
- notification_title: Účastník <a href="%{resource_path}">%{resource_title}</a> se pokusil ověřit údaji spravovaného účastníka <a href="%{managed_user_path}">%{managed_user_name}</a>
82
+ email_intro: Účastník <a href="%{resource_path}">%{resource_title}</a> se pokusil ověřit se údaji spravovaného účastníka <a href="%{managed_user_path}">%{managed_user_name}</a>.
83
+ email_outro: Zkontrolujte seznam konfliktů <a href="%{conflicts_path}">ověření</a> a kontaktujte uživatele pro ověření jejich údajů a vyřešení problému.
84
+ email_subject: Neúspěšný pokus o ověření proti spravovanému uživateli
85
+ notification_title: Účastník <a href="%{resource_path}">%{resource_title}</a> se pokusil ověřit se údaji spravovaného účastníka <a href="%{managed_user_path}">%{managed_user_name}</a>.
82
86
  verifications:
83
87
  authorizations:
84
88
  authorization_metadata:
@@ -1 +1,2 @@
1
+ ---
1
2
  da:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  de:
2
3
  activemodel:
3
4
  attributes:
@@ -75,10 +76,6 @@ de:
75
76
  postal_letter:
76
77
  explanation: Wir senden Ihnen einen Brief mit einem Code, den Sie eingeben müssen, damit wir Ihre Adresse bestätigen können
77
78
  name: Code per Post
78
- events:
79
- verifications:
80
- verify_with_managed_user:
81
- notification_title: Der Teilnehmer <a href="%{resource_path}">%{resource_title}</a> hat versucht, sich mit den Daten des verwalteten Teilnehmers <a href="%{managed_user_path}">%{managed_user_name}</a> zu verifizieren.
82
79
  verifications:
83
80
  authorizations:
84
81
  authorization_metadata:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  el:
2
3
  activemodel:
3
4
  attributes:
@@ -79,7 +79,10 @@ en:
79
79
  events:
80
80
  verifications:
81
81
  verify_with_managed_user:
82
- notification_title: The participant <a href="%{resource_path}">%{resource_title}</a> has tried to verify herself with the data of the managed participant <a href="%{managed_user_path}">%{managed_user_name}</a>
82
+ email_intro: The participant <a href="%{resource_path}">%{resource_title}</a> has tried to verify themself with the data of the managed participant <a href="%{managed_user_path}">%{managed_user_name}</a>.
83
+ email_outro: Check the <a href="%{conflicts_path}">Verifications's conflicts list</a> and contact the participant to verify their details and solve the issue.
84
+ email_subject: Failed verification attempt against a managed participant
85
+ notification_title: The participant <a href="%{resource_path}">%{resource_title}</a> has tried to verify themself with the data of the managed participant <a href="%{managed_user_path}">%{managed_user_name}</a>.
83
86
  verifications:
84
87
  authorizations:
85
88
  authorization_metadata:
@@ -189,7 +192,7 @@ en:
189
192
  verification_number: 'Verification #%{n}'
190
193
  rejections:
191
194
  create:
192
- success: Verification rejected. Participant will be prompted to amend her documents
195
+ success: Verification rejected. Participant will be prompted to amend their documents
193
196
  authorizations:
194
197
  choose:
195
198
  choose_a_type: 'Please select how you want to be verified:'
@@ -1 +1,2 @@
1
+ ---
1
2
  eo:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  es-MX:
2
3
  activemodel:
3
4
  attributes:
@@ -78,7 +79,10 @@ es-MX:
78
79
  events:
79
80
  verifications:
80
81
  verify_with_managed_user:
81
- notification_title: La participante <a href="%{resource_path}">%{resource_title}</a> ha intentado verificarse a si misma con los datos de la participante gestionada <a href="%{managed_user_path}">%{managed_user_name}</a>
82
+ email_intro: La participante <a href="%{resource_path}">%{resource_title}</a> ha intentado verificarse a si misma con los datos de la participante gestionada <a href="%{managed_user_path}">%{managed_user_name}</a>.
83
+ email_outro: Comprueba la <a href="%{conflicts_path}">lista de conflictos de verificaciones</a> y ponte en contacto con la participante para verificar sus detalles y resolver el problema.
84
+ email_subject: Error al intentar verificarse contra una participante gestionada
85
+ notification_title: La participante <a href="%{resource_path}">%{resource_title}</a> ha intentado verificarse a si misma con los datos de la participante gestionada <a href="%{managed_user_path}">%{managed_user_name}</a>.
82
86
  verifications:
83
87
  authorizations:
84
88
  authorization_metadata:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  es-PY:
2
3
  activemodel:
3
4
  attributes:
@@ -78,7 +79,10 @@ es-PY:
78
79
  events:
79
80
  verifications:
80
81
  verify_with_managed_user:
81
- notification_title: La participante <a href="%{resource_path}">%{resource_title}</a> ha intentado verificarse a si misma con los datos de la participante gestionada <a href="%{managed_user_path}">%{managed_user_name}</a>
82
+ email_intro: La participante <a href="%{resource_path}">%{resource_title}</a> ha intentado verificarse a si misma con los datos de la participante gestionada <a href="%{managed_user_path}">%{managed_user_name}</a>.
83
+ email_outro: Comprueba la <a href="%{conflicts_path}">lista de conflictos de verificaciones</a> y ponte en contacto con la participante para verificar sus detalles y resolver el problema.
84
+ email_subject: Error al intentar verificarse contra una participante gestionada
85
+ notification_title: La participante <a href="%{resource_path}">%{resource_title}</a> ha intentado verificarse a si misma con los datos de la participante gestionada <a href="%{managed_user_path}">%{managed_user_name}</a>.
82
86
  verifications:
83
87
  authorizations:
84
88
  authorization_metadata:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  es:
2
3
  activemodel:
3
4
  attributes:
@@ -78,7 +79,10 @@ es:
78
79
  events:
79
80
  verifications:
80
81
  verify_with_managed_user:
81
- notification_title: La participante <a href="%{resource_path}">%{resource_title}</a> ha intentado verificarse a si misma con los datos de la participante gestionada <a href="%{managed_user_path}">%{managed_user_name}</a>
82
+ email_intro: La participante <a href="%{resource_path}">%{resource_title}</a> ha intentado verificarse a si misma con los datos de la participante gestionada <a href="%{managed_user_path}">%{managed_user_name}</a>.
83
+ email_outro: Comprueba la <a href="%{conflicts_path}">lista de conflictos de verificaciones</a> y ponte en contacto con la participante para verificar sus detalles y resolver el problema.
84
+ email_subject: Error al intentar verificarse contra una participante gestionada
85
+ notification_title: La participante <a href="%{resource_path}">%{resource_title}</a> ha intentado verificarse a si misma con los datos de la participante gestionada <a href="%{managed_user_path}">%{managed_user_name}</a>.
82
86
  verifications:
83
87
  authorizations:
84
88
  authorization_metadata:
@@ -1 +1,2 @@
1
+ ---
1
2
  et:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  eu:
2
3
  activemodel:
3
4
  attributes:
@@ -75,10 +76,6 @@ eu:
75
76
  postal_letter:
76
77
  explanation: Posta-gutun bat bidaliko dizugu, sartu behar duzun kode batekin, beraz, zure helbidea egiaztatu ahal izango dugu
77
78
  name: Kodea posta bidez
78
- events:
79
- verifications:
80
- verify_with_managed_user:
81
- notification_title: <a href="%{resource_path}">%{resource_title}</a> parte-hartzailea saiatu da bere burua identifikatzen <a href="%{managed_user_path}">%{managed_user_name}</a> kudeatutako parte-hartzailearen datuekin
82
79
  verifications:
83
80
  authorizations:
84
81
  authorization_metadata:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  fi-pl:
2
3
  activemodel:
3
4
  attributes:
@@ -78,7 +79,10 @@ fi-pl:
78
79
  events:
79
80
  verifications:
80
81
  verify_with_managed_user:
81
- notification_title: Osallistuja <a href="%{resource_path}">%{resource_title}</a> yritti tunnistautua hallitun käyttäjän <a href="%{managed_user_path}">%{managed_user_name}</a> tiedoilla
82
+ email_intro: Osallistuja <a href="%{resource_path}">%{resource_title}</a> yritti tunnistautua hallitun käyttäjän <a href="%{managed_user_path}">%{managed_user_name}</a> tiedoilla.
83
+ email_outro: Tarkasta <a href="%{conflicts_path}">tunnistautumisten vahvistusten konfliktilista</a> ja ota yhteyttä osallistujaan tarkastaaksesi hänen tietonsa ja ratkaistaksesi ongelman.
84
+ email_subject: Hallitun käyttäjän tunnistaminen epäonnistui
85
+ notification_title: Osallistuja <a href="%{resource_path}">%{resource_title}</a> yritti tunnistautua hallitun käyttäjän <a href="%{managed_user_path}">%{managed_user_name}</a> tiedoilla.
82
86
  verifications:
83
87
  authorizations:
84
88
  authorization_metadata:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  fi:
2
3
  activemodel:
3
4
  attributes:
@@ -78,7 +79,10 @@ fi:
78
79
  events:
79
80
  verifications:
80
81
  verify_with_managed_user:
81
- notification_title: Osallistuja <a href="%{resource_path}">%{resource_title}</a> yritti tunnistautua hallitun käyttäjän <a href="%{managed_user_path}">%{managed_user_name}</a> tiedoilla
82
+ email_intro: Osallistuja <a href="%{resource_path}">%{resource_title}</a> yritti tunnistautua hallitun käyttäjän <a href="%{managed_user_path}">%{managed_user_name}</a> tiedoilla.
83
+ email_outro: Tarkasta <a href="%{conflicts_path}">tunnistautumisten vahvistusten konfliktilista</a> ja ota yhteyttä osallistujaan tarkastaaksesi hänen tietonsa ja ratkaistaksesi ongelman.
84
+ email_subject: Hallitun käyttäjän tunnistaminen epäonnistui
85
+ notification_title: Osallistuja <a href="%{resource_path}">%{resource_title}</a> yritti tunnistautua hallitun käyttäjän <a href="%{managed_user_path}">%{managed_user_name}</a> tiedoilla.
82
86
  verifications:
83
87
  authorizations:
84
88
  authorization_metadata:
@@ -188,7 +192,7 @@ fi:
188
192
  verification_number: 'Vahvistus #%{n}'
189
193
  rejections:
190
194
  create:
191
- success: Vahvistus hylätty. Käyttäjää pyydetään muuttamaan asiakirjojaan
195
+ success: Vahvistus hylätty. Käyttäjää pyydetään päivittämään lataamiaan asiakirjoja
192
196
  authorizations:
193
197
  choose:
194
198
  choose_a_type: 'Valitse, kuinka haluat varmistaa henkilöllisyytesi:'
@@ -1,3 +1,4 @@
1
+ ---
1
2
  fr-CA:
2
3
  activemodel:
3
4
  attributes:
@@ -78,7 +79,10 @@ fr-CA:
78
79
  events:
79
80
  verifications:
80
81
  verify_with_managed_user:
81
- notification_title: Le participant <a href="%{resource_path}">%{resource_title}</a> a essayé de se vérifier avec les données du participant représenté <a href="%{managed_user_path}">%{managed_user_name}</a>
82
+ email_intro: Le participant <a href="%{resource_path}">%{resource_title}</a> a essayé d'être vérifié avec les données de l'utilisateur représenté <a href="%{managed_user_path}">%{managed_user_name}</a>.
83
+ email_outro: Consultez la <a href="%{conflicts_path}">liste de conflits des vérifications</a> et contactez le participant pour vérifier ses détails et résoudre le problème. Si vous souhaitez vous désabonner des notifications, connectez-vous à la plateforme, puis rendez-vous dans l'onglet “Mon compte” > “Paramètres des notifications”.
84
+ email_subject: Echec lors de la tentative de vérification d'un participant
85
+ notification_title: Le participant <a href="%{resource_path}">%{resource_title}</a> a essayé d'être vérifié avec les données de l'utilisateur représenté <a href="%{managed_user_path}">%{managed_user_name}</a>.
82
86
  verifications:
83
87
  authorizations:
84
88
  authorization_metadata:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  fr:
2
3
  activemodel:
3
4
  attributes:
@@ -78,7 +79,10 @@ fr:
78
79
  events:
79
80
  verifications:
80
81
  verify_with_managed_user:
81
- notification_title: Le participant <a href="%{resource_path}">%{resource_title}</a> a essayé de se vérifier avec les données du participant représenté <a href="%{managed_user_path}">%{managed_user_name}</a>
82
+ email_intro: Le participant <a href="%{resource_path}">%{resource_title}</a> a essayé d'être vérifié avec les données de l'utilisateur représenté <a href="%{managed_user_path}">%{managed_user_name}</a>.
83
+ email_outro: Consultez la <a href="%{conflicts_path}">liste de conflits des vérifications</a> et contactez le participant pour vérifier ses détails et résoudre le problème. Si vous souhaitez vous désabonner des notifications, connectez-vous à la plateforme, puis rendez-vous dans l'onglet “Mon compte” > “Paramètres des notifications”.
84
+ email_subject: Echec lors de la tentative de vérification d'un participant
85
+ notification_title: Le participant <a href="%{resource_path}">%{resource_title}</a> a essayé d'être vérifié avec les données de l'utilisateur représenté <a href="%{managed_user_path}">%{managed_user_name}</a>.
82
86
  verifications:
83
87
  authorizations:
84
88
  authorization_metadata:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ga:
2
3
  activemodel:
3
4
  attributes:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  gl:
2
3
  activemodel:
3
4
  attributes:
@@ -75,10 +76,6 @@ gl:
75
76
  postal_letter:
76
77
  explanation: Enviarémosche unha carta postal cun código que terás que ingresar para poder verificar a túa dirección
77
78
  name: Código por carta postal
78
- events:
79
- verifications:
80
- verify_with_managed_user:
81
- notification_title: P participante <a href="%{resource_path}">%{resource_title}</a> tentou a verificación de si mesmo/a cos datos do participante xestionado <a href="%{managed_user_path}">%{managed_user_name}</a>
82
79
  verifications:
83
80
  authorizations:
84
81
  authorization_metadata:
@@ -1 +1,2 @@
1
+ ---
1
2
  hr:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  hu:
2
3
  activemodel:
3
4
  attributes:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  id:
2
3
  activemodel:
3
4
  attributes:
@@ -1,4 +1,5 @@
1
- is-IS:
1
+ ---
2
+ is:
2
3
  activemodel:
3
4
  attributes:
4
5
  id_document_information:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  it:
2
3
  activemodel:
3
4
  attributes:
@@ -78,7 +79,10 @@ it:
78
79
  events:
79
80
  verifications:
80
81
  verify_with_managed_user:
81
- notification_title: La partecipante <a href="%{resource_path}">%{resource_title}</a> ha provato a verificarsi con i dati della partecipante gestita <a href="%{managed_user_path}">%{managed_user_name}</a>
82
+ email_intro: L'utente<a href="%{resource_path}">%{resource_title}</a> ha provato a verificarsi con i dati dell'utente<a href="%{managed_user_path}">%{managed_user_name}</a>.
83
+ email_outro: Controllare l'<a href="%{conflicts_path}">elenco dei conflitti nelle verifiche</a> e contattare l'utente per verificare i propri dati e risolvere il problema.
84
+ email_subject: 'Tentativo di verifica fallito: l''utente esiste già'
85
+ notification_title: L'utente<a href="%{resource_path}">%{resource_title}</a> ha provato a verificarsi con i dati dell'utente<a href="%{managed_user_path}">%{managed_user_name}</a>.
82
86
  verifications:
83
87
  authorizations:
84
88
  authorization_metadata:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ja:
2
3
  activemodel:
3
4
  attributes:
@@ -78,7 +79,10 @@ ja:
78
79
  events:
79
80
  verifications:
80
81
  verify_with_managed_user:
81
- notification_title: 参加者 <a href="%{resource_path}">%{resource_title}</a> が管理参加者 <a href="%{managed_user_path}">%{managed_user_name}</a> のデータと自分自身を確認しようとしました。
82
+ email_intro: 参加者 <a href="%{resource_path}">%{resource_title}</a> が管理対象参加者 <a href="%{managed_user_path}">%{managed_user_name}</a>のデータで検証しようとしました。
83
+ email_outro: <a href="%{conflicts_path}">検証の競合リスト</a> を確認し、参加者に連絡して詳細を調査し、問題を解決します。
84
+ email_subject: 管理対象参加者に対する検証の試みに失敗しました
85
+ notification_title: 参加者 <a href="%{resource_path}">%{resource_title}</a> が管理参加者 <a href="%{managed_user_path}">%{managed_user_name}</a>のデータでそれらを確認しようとしました。
82
86
  verifications:
83
87
  authorizations:
84
88
  authorization_metadata:
@@ -1 +1,2 @@
1
+ ---
1
2
  ko:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  lb:
2
3
  activemodel:
3
4
  attributes:
@@ -1 +1,2 @@
1
+ ---
1
2
  lt:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  lv:
2
3
  activemodel:
3
4
  attributes:
@@ -1 +1,2 @@
1
+ ---
1
2
  mt:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  nl:
2
3
  activemodel:
3
4
  attributes:
@@ -184,7 +185,7 @@ nl:
184
185
  verification_number: 'Verificatie # %{n}'
185
186
  rejections:
186
187
  create:
187
- success: Verificatie geweigerd. De deelnemer wordt gevraagd om haar documenten te wijzigen
188
+ success: Verificatie geweigerd. De deelnemer wordt gevraagd om zijn/haar documenten te wijzigen
188
189
  authorizations:
189
190
  choose:
190
191
  choose_a_type: 'Selecteer alstublieft hoe u wilt worden geverifieerd:'
@@ -1,3 +1,4 @@
1
+ ---
1
2
  "no":
2
3
  activemodel:
3
4
  attributes:
@@ -75,10 +76,6 @@
75
76
  postal_letter:
76
77
  explanation: Vi sender deg et postbrev med en kode som du må oppgi slik at vi kan bekrefte adressen din
77
78
  name: Kode med post brev
78
- events:
79
- verifications:
80
- verify_with_managed_user:
81
- notification_title: Deltakeren <a href="%{resource_path}">%{resource_title}</a> har forsøkt å verifisere seg selv med data fra den håndterte deltakeren <a href="%{managed_user_path}">%{managed_user_name}</a>
82
79
  verifications:
83
80
  authorizations:
84
81
  authorization_metadata:
@@ -1 +1,2 @@
1
+ ---
1
2
  om:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  pl:
2
3
  activemodel:
3
4
  attributes:
@@ -75,10 +76,6 @@ pl:
75
76
  postal_letter:
76
77
  explanation: Wyślemy Ci list pocztowy z kodem, który musisz wprowadzić, abyśmy mogli zweryfikować twój adres
77
78
  name: Kod listem pocztowym
78
- events:
79
- verifications:
80
- verify_with_managed_user:
81
- notification_title: Użytkownik <a href="%{resource_path}">%{resource_title}</a> próbował zweryfikować siebie z danymi zarządzanego użytkownika <a href="%{managed_user_path}">%{managed_user_name}</a>
82
79
  verifications:
83
80
  authorizations:
84
81
  authorization_metadata:
@@ -1,4 +1,5 @@
1
- pt-BR:
1
+ ---
2
+ pt:
2
3
  activemodel:
3
4
  attributes:
4
5
  config:
@@ -75,10 +76,6 @@ pt-BR:
75
76
  postal_letter:
76
77
  explanation: Nós lhe enviaremos uma carta postal com um código que você terá que inserir para que possamos verificar seu endereço
77
78
  name: Código por carta postal
78
- events:
79
- verifications:
80
- verify_with_managed_user:
81
- notification_title: O usuário <a href="%{resource_path}">%{resource_title}</a> tentou se verificar com os dados do usuário gerenciado <a href="%{managed_user_path}">%{managed_user_name}</a>
82
79
  verifications:
83
80
  authorizations:
84
81
  authorization_metadata:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  pt:
2
3
  activemodel:
3
4
  attributes:
@@ -75,10 +76,6 @@ pt:
75
76
  postal_letter:
76
77
  explanation: Enviaremos-lhe uma carta postal com um código que terá que inserir para que possamos verificar o seu endereço
77
78
  name: Código por carta postal
78
- events:
79
- verifications:
80
- verify_with_managed_user:
81
- notification_title: O participante <a href=«%{resource_path}»>%{resource_title}</a> tentou verificar-se com os dados do participante gerido <a href=«%{managed_user_path}»>>%{managed_user_name}</a>
82
79
  verifications:
83
80
  authorizations:
84
81
  authorization_metadata:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ro:
2
3
  activemodel:
3
4
  attributes:
@@ -75,10 +76,6 @@ ro:
75
76
  postal_letter:
76
77
  explanation: Îți vom trimite o scrisoare poștală cu un cod pe care va trebui să-l introduci pentru a-ți putea verifica adresa
77
78
  name: Cod primit prin scrisoare poștală
78
- events:
79
- verifications:
80
- verify_with_managed_user:
81
- notification_title: Participantul <a href="%{resource_path}">%{resource_title}</a> a încercat să își verifice contul cu datele participantului <a href="%{managed_user_path}">%{managed_user_name}</a>
82
79
  verifications:
83
80
  authorizations:
84
81
  authorization_metadata:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ru:
2
3
  activemodel:
3
4
  attributes:
@@ -1 +1,2 @@
1
+ ---
1
2
  si:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  sk:
2
3
  activemodel:
3
4
  attributes:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  sl:
2
3
  activemodel:
3
4
  attributes:
@@ -1 +1,2 @@
1
+ ---
1
2
  so:
@@ -1 +1,2 @@
1
+ ---
1
2
  sr:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  sv:
2
3
  activemodel:
3
4
  attributes:
@@ -1 +1,2 @@
1
+ ---
1
2
  sw:
@@ -1 +1,2 @@
1
+ ---
1
2
  ti:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  tr:
2
3
  activemodel:
3
4
  attributes:
@@ -67,10 +68,6 @@ tr:
67
68
  postal_letter:
68
69
  explanation: Size adresinizi doğrulayabilmemiz için girmeniz gereken bir kod içeren bir posta mektubu göndereceğiz.
69
70
  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ı
74
71
  verifications:
75
72
  authorizations:
76
73
  authorization_metadata:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  uk:
2
3
  activemodel:
3
4
  attributes:
@@ -1 +1,2 @@
1
+ ---
1
2
  val:
@@ -1 +1,2 @@
1
+ ---
1
2
  vi:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  zh-CN:
2
3
  activemodel:
3
4
  attributes:
@@ -1 +1,2 @@
1
+ ---
1
2
  zh-TW:
@@ -12,7 +12,7 @@ module Decidim
12
12
  end
13
13
 
14
14
  def deliver_code
15
- Rails.logger.debug("Example SMS gateway service, verification code is: #{code}, should have been delivered to #{mobile_phone_number}")
15
+ Rails.logger.debug { "Example SMS gateway service, verification code is: #{code}, should have been delivered to #{mobile_phone_number}" }
16
16
  true
17
17
  end
18
18
  end
@@ -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.26.0"
7
+ "0.27.0.rc1"
8
8
  end
9
9
  end
10
10
  end
@@ -10,7 +10,7 @@ module Decidim
10
10
  # This class serves as a DSL to declaratively specify a verification method.
11
11
  #
12
12
  # To define a direct verification method, you need to specify the `form`
13
- # attribute as a `Rectify::Form` that will be valid if the authorization is
13
+ # attribute as a `Decidim::Form` that will be valid if the authorization is
14
14
  # valid.
15
15
  #
16
16
  # To define a deferred verification method, you need specify the `engine`
@@ -27,10 +27,10 @@ module Decidim
27
27
  #
28
28
  class WorkflowManifest
29
29
  include ActiveModel::Model
30
- include Virtus.model
30
+ include Decidim::AttributeObject::Model
31
31
 
32
- attribute :engine, Rails::Engine
33
- attribute :admin_engine, Rails::Engine
32
+ attribute :engine, Rails::Engine, **{}
33
+ attribute :admin_engine, Rails::Engine, **{}
34
34
  attribute :form, String
35
35
  attribute :expires_in, ActiveSupport::Duration, default: 0.minutes
36
36
  attribute :action_authorizer, String
@@ -62,8 +62,8 @@ module Decidim
62
62
  end
63
63
 
64
64
  def action_authorizer_class
65
- if @action_authorizer.present?
66
- @action_authorizer.constantize
65
+ if action_authorizer.present?
66
+ action_authorizer.constantize
67
67
  else
68
68
  DefaultActionAuthorizer
69
69
  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.26.0
4
+ version: 0.27.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: 2022-02-22 00:00:00.000000000 Z
11
+ date: 2022-06-27 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.26.0
19
+ version: 0.27.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.26.0
26
+ version: 0.27.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.26.0
33
+ version: 0.27.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.26.0
40
+ version: 0.27.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.26.0
47
+ version: 0.27.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.26.0
54
+ version: 0.27.0.rc1
55
55
  description: Several verification methods for your decidim instance
56
56
  email:
57
57
  - deivid.rodriguez@riseup.net
@@ -253,14 +253,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
253
253
  requirements:
254
254
  - - ">="
255
255
  - !ruby/object:Gem::Version
256
- version: '2.7'
256
+ version: '3.0'
257
257
  required_rubygems_version: !ruby/object:Gem::Requirement
258
258
  requirements:
259
- - - ">="
259
+ - - ">"
260
260
  - !ruby/object:Gem::Version
261
- version: '0'
261
+ version: 1.3.1
262
262
  requirements: []
263
- rubygems_version: 3.1.6
263
+ rubygems_version: 3.2.22
264
264
  signing_key:
265
265
  specification_version: 4
266
266
  summary: Decidim verifications module