decidim-file_authorization_handler 0.27.1.5 → 0.27.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ab89f93daaadbc27ec2b19709068e93eeff9af2f9fc2df8ec1ac66048f458bd
4
- data.tar.gz: e6461006d84051e1c4b63635ec42c5387690f208bc079b8a8260d7717f37b899
3
+ metadata.gz: a22d828172cb54cac56955cbe38992201532716c7fb365303add06b6bcf55c3a
4
+ data.tar.gz: 45aecfbc518b3bce2a4d06debc15b3b12336b3b5d912bc62d2cbd6510594d01d
5
5
  SHA512:
6
- metadata.gz: 3a571bdab6a3213f904c2bcbb4ebd1e89687458027c2477caddc6bb4a142069b13e8dfee8f99f5f199f1f4956ef170664174bbe5d7e5bb795ffb4d9ab29587bd
7
- data.tar.gz: a70639ef820580610566a24824051f6f18ce3269a193bf79eacbb8126f773c0eb9e88618b936fb786ac1a08c4a6b109062a8879aa65250330ae29a8f5cc2fe3a
6
+ metadata.gz: 5b9009b18ab4be07c37d88dca67834fdeb9632220978d9fc4d109744c7eb71b86377e2a549573d3d3e97d3158ce897e151c6e8092e5495e56931547a823eff75
7
+ data.tar.gz: 500e0f022a1acb3ccb9867cb6056ffd6e41e812152651085d97fc31b068e7e8b001d5e3dd4cdb0a2d00a47893d1819fccb22d07bce706e8f319f5b7b4b647a64
@@ -5,6 +5,9 @@
5
5
  class FileAuthorizationHandler < Decidim::AuthorizationHandler
6
6
  # This is the input (from the user) to validate against
7
7
  attribute :id_document, String
8
+ # This is a hack in order to sign initiatives because in decidim-initiatives/app/forms/decidim/initiatives/vote_form.rb
9
+ # send to handler_for a param named document_number.
10
+ attribute :document_number, String
8
11
  attribute :birthdate, Decidim::Attributes::LocalizedDate
9
12
 
10
13
  # This is the validation to perform
@@ -50,7 +53,7 @@ class FileAuthorizationHandler < Decidim::AuthorizationHandler
50
53
  return unless organization
51
54
 
52
55
  @census_for_user ||= Decidim::FileAuthorizationHandler::CensusDatum
53
- .search_id_document(organization, id_document)
56
+ .search_id_document(organization, id_document || document_number)
54
57
  end
55
58
 
56
59
  def organization
@@ -7,6 +7,6 @@ module Decidim
7
7
  # Uses the latest matching Decidim version for
8
8
  # - major, minor and patch
9
9
  # - the optional extra number is related to this module's patches
10
- VERSION = "#{DECIDIM_VERSION}.5".freeze
10
+ VERSION = "#{DECIDIM_VERSION}.6".freeze
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-file_authorization_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.1.5
4
+ version: 0.27.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Gómez
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-09-21 00:00:00.000000000 Z
13
+ date: 2023-12-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim