decidim-verifications-members_picker 0.0.6.1 → 0.1.1

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: f27f20443bb93a10902770ea382def4a6ec85100cdec25310b30d8a7312d558d
4
- data.tar.gz: a85742ced9cd952b7700a4aedcbe0a0a073e501b8fdf3772fc5741abe5bc5388
3
+ metadata.gz: 2322833c11c71609478a5cc70d38f69c2ceb9b9e5fd6a100e3b8bf42edf3a557
4
+ data.tar.gz: 4a1b091df13bb29292f57da7e2e2d8f594f14cca8710dd381d72515d95b602a5
5
5
  SHA512:
6
- metadata.gz: 3d4329902fe976c1b41c7471a32a512ec396fa73113fc5f8a44abcb063f918127a6fd754db3a489e6673dcbbd621b8c74f66d1a6534769a05392136953847b23
7
- data.tar.gz: fec8eb381045595834c7272aa08cb07c344b8083e2dbaf1bef74f09f247e0f1fbb4bbc2cad3f3eaf467357937ab3de7e7ac7ad88bbfec6e896a9e0f843a67181
6
+ metadata.gz: 8059e46887c5815957b92570fb71d8c429206a98e40dcb91ce0cf0de1253690b0f43e79780ccd3772ecff3fbcd6b147929a11ea23b525303782958bf76fba33b
7
+ data.tar.gz: ba57c6a3098151638072153d0d63f7ad1c9a7f27f36c08736a244bfcc30141807ebcb1e5cec3a5913b7d0f43f8d55beecfa59137f7db09a69ccfc84aeb647d72
@@ -1,48 +1,46 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Decidim
4
- class UserDecorator
5
- def self.decorate
6
- Decidim::User.class_eval do
7
- def after_confirmation
8
- return unless available_members_picker_authorization?
3
+ module Decidim::UserDecorator
4
+ def self.decorate
5
+ Decidim::User.class_eval do
6
+ def after_confirmation
7
+ return unless available_members_picker_authorization?
9
8
 
10
- Decidim::Authorization.create_or_update_from(handler)
11
- end
9
+ Decidim::Authorization.create_or_update_from(handler)
10
+ end
12
11
 
13
- def grant_authorization
14
- after_confirmation
15
- end
12
+ def grant_authorization
13
+ after_confirmation
14
+ end
16
15
 
17
- def email_changed?
18
- revoke_members_picker_authorization!
19
- end
16
+ def email_changed?
17
+ revoke_members_picker_authorization!
18
+ end
20
19
 
21
- private
20
+ private
22
21
 
23
- def available_members_picker_authorization?
24
- organization.available_authorizations.member?(handler_name)
25
- end
22
+ def available_members_picker_authorization?
23
+ organization.available_authorizations.member?(handler_name)
24
+ end
26
25
 
27
- def handler_params
28
- @handler_params ||= { user: self, members_picker: email }
29
- end
26
+ def handler_params
27
+ @handler_params ||= { user: self, members_picker: email }
28
+ end
30
29
 
31
- def handler_name
32
- @handler_name ||= Decidim::Verifications::MembersPicker::MembersPickerAuthorizationHandler.handler_name
33
- end
30
+ def handler_name
31
+ @handler_name ||= Decidim::Verifications::MembersPicker::MembersPickerAuthorizationHandler.handler_name
32
+ end
34
33
 
35
- def handler
36
- @handler ||= Decidim::AuthorizationHandler.handler_for(handler_name, handler_params)
37
- end
34
+ def handler
35
+ @handler ||= Decidim::AuthorizationHandler.handler_for(handler_name, handler_params)
36
+ end
38
37
 
39
- def granted_members_picker_authorization
40
- Decidim::Authorization.find_by(decidim_user_id: id, name: handler_name)
41
- end
38
+ def granted_members_picker_authorization
39
+ Decidim::Authorization.find_by(decidim_user_id: id, name: handler_name)
40
+ end
42
41
 
43
- def revoke_members_picker_authorization!
44
- granted_members_picker_authorization.destroy! if granted_members_picker_authorization
45
- end
42
+ def revoke_members_picker_authorization!
43
+ granted_members_picker_authorization.destroy! if granted_members_picker_authorization
46
44
  end
47
45
  end
48
46
  end
@@ -15,7 +15,7 @@ module Decidim
15
15
  end
16
16
 
17
17
  def metadata
18
- super.merge(members_picker: members_picker)
18
+ super.merge(members_picker:)
19
19
  end
20
20
 
21
21
  private
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Verifications
6
6
  module MembersPicker
7
7
  def self.version
8
- "0.0.6.1"
8
+ "0.1.1"
9
9
  end
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-verifications-members_picker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6.1
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agusti B.R.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-13 00:00:00.000000000 Z
11
+ date: 2024-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-core
@@ -16,70 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.27.5
19
+ version: 0.28.0
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.27.5
26
+ version: 0.28.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: decidim-verifications
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.27.5
33
+ version: 0.28.0
34
34
  type: :runtime
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.27.5
41
- - !ruby/object:Gem::Dependency
42
- name: psych
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "<"
46
- - !ruby/object:Gem::Version
47
- version: '4'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "<"
53
- - !ruby/object:Gem::Version
54
- version: '4'
40
+ version: 0.28.0
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: decidim
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - ">="
60
46
  - !ruby/object:Gem::Version
61
- version: 0.27.5
47
+ version: 0.28.0
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - ">="
67
53
  - !ruby/object:Gem::Version
68
- version: 0.27.5
54
+ version: 0.28.0
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: decidim-dev
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
59
  - - ">="
74
60
  - !ruby/object:Gem::Version
75
- version: 0.27.5
61
+ version: 0.28.0
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
66
  - - ">="
81
67
  - !ruby/object:Gem::Version
82
- version: 0.27.5
68
+ version: 0.28.0
83
69
  description: The Admin is able to hand-pick which emails are allowed to participate
84
70
  from the component permissions screen.
85
71
  email:
@@ -114,14 +100,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
114
100
  requirements:
115
101
  - - ">="
116
102
  - !ruby/object:Gem::Version
117
- version: '3.0'
103
+ version: '3.1'
118
104
  required_rubygems_version: !ruby/object:Gem::Requirement
119
105
  requirements:
120
106
  - - ">="
121
107
  - !ruby/object:Gem::Version
122
108
  version: '0'
123
109
  requirements: []
124
- rubygems_version: 3.2.33
110
+ rubygems_version: 3.3.7
125
111
  signing_key:
126
112
  specification_version: 4
127
113
  summary: A decidim-verifications module to restrict which emails can participate in