decidim-verify_wo_registration 0.1.0 → 0.2.0

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: 5591c6786a6b868acab83dda9fb1617ce216abb8e38eeec9e6a69e0780feb44a
4
- data.tar.gz: 0bc507423086d5f268420349b8b5f29ed7ce0c38dc87feb182c0438490fa4d3a
3
+ metadata.gz: c7a851391a71f837b99ae1d5166f120cde333ad102f4f4066992a9eed61b3db4
4
+ data.tar.gz: fe5a065db2ae7f44f105c571703dd77167907cfa93862d1a561871901890e8a5
5
5
  SHA512:
6
- metadata.gz: 6c22ded2aa0c47e74f5ef3ae33c8429c1d646e05bee45870e4d45a08e1bab5e53d7bb51bb48ef7bc38d1af5cc007cf1b643b033f02a506ecec87ca317d177751
7
- data.tar.gz: a303a1d45f444395ce17ff9d880e5436da0961fccaf1b0edbcbdfc4cbb81da27ce5f9fa4b1d73883c8845dd0ec6cdb53d2e40e6c04571b7989d5b0c0dc6eda51
6
+ metadata.gz: 38f21953b3c1e01201a067b0126dc90ca275abc60bfa2decfc576bf836e57de4bf6bf11a04b11a8a204517622cccb148bd4d4eebddc2a9a55d11e580092a3bd4
7
+ data.tar.gz: d94c5f2cbb48cae29d6f1dd99d20a6b748a866cd464f553bbc4e2bb114c1f57e754c25966c53860795109ca682fab65efdd1027a6e3905ab5346d42d43b7e55b
@@ -94,9 +94,10 @@ module Decidim
94
94
  end
95
95
 
96
96
  def create_or_update_authorization
97
- handler= @form.verified_handler
98
- handler.user = user
99
- Authorization.create_or_update_from(handler)
97
+ @form.authorization_handlers.each do |handler|
98
+ handler.user = user
99
+ Authorization.create_or_update_from(handler)
100
+ end
100
101
  end
101
102
 
102
103
  def user_authorizations
@@ -63,20 +63,15 @@ module Decidim
63
63
  end
64
64
  end
65
65
 
66
- # Provides the handler that verified the user data to the command
67
- def verified_handler
68
- @verified_handler
69
- end
70
-
71
66
  # ----------------------------------------------------------------------
72
67
  private
73
68
  # ----------------------------------------------------------------------
74
69
 
75
- # Check if the data introduced by the user verifies against any handler enabled for the current component.
70
+ # Check if the data introduced by the user verifies against all handlers enabled for the current component.
76
71
  def verify_against_enabled_authorization_handlers
77
- @verified_handler= authorization_handlers.find {|handler| handler.valid? }
72
+ invalid_handler= authorization_handlers.find {|handler| handler.invalid? }
78
73
 
79
- errors.add(:authorizations, :invalid) unless @verified_handler
74
+ errors.add(:authorizations, :invalid) if invalid_handler
80
75
  end
81
76
  end
82
77
  end
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  # This holds the decidim-meetings version.
5
5
  module VerifyWoRegistration
6
- VERSION = '0.1.0'
6
+ VERSION = '0.2.0'
7
7
  DECIDIM_VER = '>= 0.27'
8
8
 
9
9
  def self.version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-verify_wo_registration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Valls
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-20 00:00:00.000000000 Z
11
+ date: 2023-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-budgets