decidim-verifications-members_picker 0.0.6.1 → 0.0.7

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: 72f11f1c45aae129c15e4618ee7fc854cef1f6a26617181417f263721f8d1d64
4
+ data.tar.gz: 4d93200d16034cabf66b7dbc2c5f3bba006e7bb188e4812e89fa1691686348bb
5
5
  SHA512:
6
- metadata.gz: 3d4329902fe976c1b41c7471a32a512ec396fa73113fc5f8a44abcb063f918127a6fd754db3a489e6673dcbbd621b8c74f66d1a6534769a05392136953847b23
7
- data.tar.gz: fec8eb381045595834c7272aa08cb07c344b8083e2dbaf1bef74f09f247e0f1fbb4bbc2cad3f3eaf467357937ab3de7e7ac7ad88bbfec6e896a9e0f843a67181
6
+ metadata.gz: e76020c68141a5e8b47fb59b874eb94d71ffbb7285b555604d36d86f06d666458c94e3ec5b34e29728e5efa69d238bfec3fe934ad6b431b4f9b3e0f8d6a510d4
7
+ data.tar.gz: 0b9f220c0951a8e4ded10ab7e1dc5af19e4030cf88567302020e98dd3d608ddd69a4edc02a0db700d50b5a95133321cc623bb7b4fcf70ca4c0dfd9264c8a6904
@@ -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
@@ -8,5 +8,4 @@ locales: [en, ca, es]
8
8
 
9
9
  ignore_unused:
10
10
  - "decidim.authorization_handlers.members_picker_authorization_handler.*"
11
- - "decidim.verifications.authorizations.first_login.*"
12
11
  - "decidim.verifications.members_picker_authorization.extra_explanation"
@@ -9,10 +9,6 @@ ca:
9
9
  members_picker_help: "(separats per comes)"
10
10
  name: Tria quins correus electrònics poden participar al component
11
11
  verifications:
12
- authorizations:
13
- first_login:
14
- actions:
15
- members_picker_authorization_handler: Elecció de membres
16
12
  members_picker_authorization:
17
13
  extra_explanation: La participació està restringida a només uns participants
18
14
  amb permís.
@@ -11,10 +11,6 @@ en:
11
11
  name: Pick the emails of the users that will be able to participate in the
12
12
  current component
13
13
  verifications:
14
- authorizations:
15
- first_login:
16
- actions:
17
- members_picker_authorization_handler: Members picker
18
14
  members_picker_authorization:
19
15
  extra_explanation: Participation is restricted to participants with the permitted
20
16
  email.
@@ -9,10 +9,6 @@ es:
9
9
  members_picker_help: "(separado por comas)"
10
10
  name: Elige qué correos electrónicos pueden participar en el componente
11
11
  verifications:
12
- authorizations:
13
- first_login:
14
- actions:
15
- members_picker_authorization_handler: Elección de miembros
16
12
  members_picker_authorization:
17
13
  extra_explanation: La participación está restringida a sólo unos participantes
18
14
  con permiso
@@ -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.0.7"
9
9
  end
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agusti B.R.
@@ -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