decidim-verifications 0.20.1 → 0.23.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -3
  3. data/app/cells/decidim/verifications/authorization_metadata/show.erb +13 -0
  4. data/app/cells/decidim/verifications/authorization_metadata_cell.rb +22 -0
  5. data/app/cells/decidim/verifications/revocations/show.erb +40 -0
  6. data/app/cells/decidim/verifications/revocations_cell.rb +19 -0
  7. data/app/commands/decidim/verifications/confirm_user_authorization.rb +49 -9
  8. data/app/commands/decidim/verifications/destroy_user_authorization.rb +24 -0
  9. data/app/commands/decidim/verifications/revoke_all_authorizations.rb +48 -0
  10. data/app/commands/decidim/verifications/revoke_by_condition_authorizations.rb +68 -0
  11. data/app/controllers/concerns/decidim/verifications/renewable.rb +37 -0
  12. data/app/controllers/decidim/verifications/admin/verifications_controller.rb +40 -0
  13. data/app/controllers/decidim/verifications/application_controller.rb +5 -1
  14. data/app/controllers/decidim/verifications/authorizations_controller.rb +19 -2
  15. data/app/controllers/decidim/verifications/csv_census/authorizations_controller.rb +3 -1
  16. data/app/controllers/decidim/verifications/id_documents/admin/confirmations_controller.rb +1 -1
  17. data/app/controllers/decidim/verifications/id_documents/authorizations_controller.rb +2 -0
  18. data/app/controllers/decidim/verifications/postal_letter/authorizations_controller.rb +3 -1
  19. data/app/controllers/decidim/verifications/sms/authorizations_controller.rb +3 -1
  20. data/app/forms/decidim/verifications/admin/revocations_before_date_form.rb +16 -0
  21. data/app/forms/decidim/verifications/id_documents/upload_form.rb +1 -2
  22. data/app/models/decidim/verifications/csv_census/data.rb +1 -1
  23. data/app/queries/decidim/verifications/authorizations_before_date.rb +51 -0
  24. data/app/services/decidim/authorization_handler.rb +4 -0
  25. data/app/views/decidim/verifications/authorizations/_granted_authorization.html.erb +29 -24
  26. data/app/views/decidim/verifications/authorizations/first_login.html.erb +2 -2
  27. data/app/views/decidim/verifications/authorizations/index.html.erb +22 -12
  28. data/app/views/decidim/verifications/authorizations/new.html.erb +2 -2
  29. data/app/views/decidim/verifications/authorizations/renew_modal.html.erb +38 -0
  30. data/app/views/decidim/verifications/id_documents/admin/pending_authorizations/index.html.erb +4 -4
  31. data/app/views/decidim/verifications/id_documents/authorizations/_form.html.erb +2 -0
  32. data/app/views/decidim/verifications/postal_letter/authorizations/edit.html.erb +2 -0
  33. data/app/views/decidim/verifications/postal_letter/authorizations/new.html.erb +2 -0
  34. data/app/views/decidim/verifications/sms/authorizations/edit.html.erb +2 -0
  35. data/app/views/decidim/verifications/sms/authorizations/new.html.erb +2 -0
  36. data/app/views/dummy_authorization/_form.html.erb +23 -4
  37. data/config/locales/am-ET.yml +1 -0
  38. data/config/locales/ar.yml +9 -6
  39. data/config/locales/bg-BG.yml +18 -0
  40. data/config/locales/bg.yml +18 -0
  41. data/config/locales/ca.yml +34 -2
  42. data/config/locales/cs.yml +36 -4
  43. data/config/locales/da-DK.yml +1 -0
  44. data/config/locales/da.yml +1 -0
  45. data/config/locales/de.yml +35 -2
  46. data/config/locales/el.yml +259 -0
  47. data/config/locales/en.yml +34 -2
  48. data/config/locales/eo.yml +1 -0
  49. data/config/locales/es-MX.yml +34 -2
  50. data/config/locales/es-PY.yml +34 -2
  51. data/config/locales/es.yml +34 -2
  52. data/config/locales/et-EE.yml +1 -0
  53. data/config/locales/et.yml +1 -0
  54. data/config/locales/eu.yml +5 -2
  55. data/config/locales/fi-plain.yml +34 -2
  56. data/config/locales/fi.yml +44 -12
  57. data/config/locales/fr-CA.yml +260 -0
  58. data/config/locales/fr.yml +34 -2
  59. data/config/locales/ga-IE.yml +1 -0
  60. data/config/locales/gl.yml +5 -2
  61. data/config/locales/hr-HR.yml +1 -0
  62. data/config/locales/hr.yml +1 -0
  63. data/config/locales/hu.yml +26 -2
  64. data/config/locales/id-ID.yml +4 -1
  65. data/config/locales/is.yml +120 -0
  66. data/config/locales/it.yml +34 -2
  67. data/config/locales/ja-JP.yml +259 -0
  68. data/config/locales/ja.yml +259 -0
  69. data/config/locales/ko-KR.yml +1 -0
  70. data/config/locales/ko.yml +1 -0
  71. data/config/locales/lt-LT.yml +1 -0
  72. data/config/locales/lt.yml +1 -0
  73. data/config/locales/lv.yml +250 -0
  74. data/config/locales/mt-MT.yml +1 -0
  75. data/config/locales/mt.yml +1 -0
  76. data/config/locales/nl.yml +34 -2
  77. data/config/locales/no.yml +5 -2
  78. data/config/locales/om-ET.yml +1 -0
  79. data/config/locales/pl.yml +91 -58
  80. data/config/locales/pt-BR.yml +6 -3
  81. data/config/locales/pt.yml +127 -94
  82. data/config/locales/ro-RO.yml +261 -0
  83. data/config/locales/ru.yml +5 -4
  84. data/config/locales/sk-SK.yml +258 -0
  85. data/config/locales/sk.yml +259 -0
  86. data/config/locales/sl.yml +5 -0
  87. data/config/locales/so-SO.yml +1 -0
  88. data/config/locales/sr-CS.yml +1 -0
  89. data/config/locales/sv.yml +34 -2
  90. data/config/locales/ti-ER.yml +1 -0
  91. data/config/locales/tr-TR.yml +5 -2
  92. data/config/locales/uk.yml +5 -4
  93. data/config/locales/vi-VN.yml +1 -0
  94. data/config/locales/vi.yml +1 -0
  95. data/config/locales/zh-CN.yml +257 -0
  96. data/config/locales/zh-TW.yml +1 -0
  97. data/lib/decidim/verifications/adapter.rb +12 -0
  98. data/lib/decidim/verifications/csv_census/engine.rb +3 -1
  99. data/lib/decidim/verifications/engine.rb +13 -0
  100. data/lib/decidim/verifications/id_documents/engine.rb +1 -0
  101. data/lib/decidim/verifications/postal_letter/engine.rb +3 -1
  102. data/lib/decidim/verifications/sms/engine.rb +3 -1
  103. data/lib/decidim/verifications/version.rb +1 -1
  104. data/lib/decidim/verifications/workflow_manifest.rb +3 -0
  105. data/lib/decidim/verifications/workflows.rb +1 -1
  106. metadata +56 -9
@@ -14,6 +14,7 @@ module Decidim
14
14
  resource :authorizations, only: [:new, :create, :edit, :update], as: :authorization do
15
15
  collection do
16
16
  get :choose
17
+ get :renew
17
18
  end
18
19
  end
19
20
 
@@ -11,7 +11,9 @@ module Decidim
11
11
  paths["lib/tasks"] = nil
12
12
 
13
13
  routes do
14
- resource :authorizations, only: [:new, :create, :edit, :update], as: :authorization
14
+ resource :authorizations, only: [:new, :create, :edit, :update], as: :authorization do
15
+ get :renew, on: :collection
16
+ end
15
17
 
16
18
  root to: "authorizations#new"
17
19
  end
@@ -11,7 +11,9 @@ module Decidim
11
11
  paths["lib/tasks"] = nil
12
12
 
13
13
  routes do
14
- resource :authorizations, only: [:new, :create, :edit, :update, :destroy], as: :authorization
14
+ resource :authorizations, only: [:new, :create, :edit, :update, :destroy], as: :authorization do
15
+ get :renew, on: :collection
16
+ end
15
17
 
16
18
  root to: "authorizations#new"
17
19
  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.20.1"
7
+ "0.23.1"
8
8
  end
9
9
  end
10
10
  end
@@ -34,6 +34,9 @@ module Decidim
34
34
  attribute :form, String
35
35
  attribute :expires_in, ActiveSupport::Duration, default: 0.minutes
36
36
  attribute :action_authorizer, String
37
+ attribute :renewable, Boolean, default: true
38
+ attribute :time_between_renewals, ActiveSupport::Duration, default: 1.day
39
+ attribute :metadata_cell, String, default: "decidim/verifications/authorization_metadata"
37
40
 
38
41
  validate :engine_or_form
39
42
 
@@ -28,7 +28,7 @@ module Decidim
28
28
  end
29
29
 
30
30
  #
31
- # Registers a verification workflow using the workflow manifest API
31
+ # Unregisters a verification workflow using the workflow manifest API
32
32
  #
33
33
  def unregister_workflow(name)
34
34
  manifest = find_workflow_manifest(name)
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.20.1
4
+ version: 0.23.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rodriguez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-27 00:00:00.000000000 Z
11
+ date: 2020-11-12 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.20.1
19
+ version: 0.23.1
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.20.1
26
+ version: 0.23.1
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.20.1
33
+ version: 0.23.1
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.20.1
40
+ version: 0.23.1
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.20.1
47
+ version: 0.23.1
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.20.1
54
+ version: 0.23.1
55
55
  description: Several verification methods for your decidim instance
56
56
  email:
57
57
  - deivid.rodriguez@riseup.net
@@ -61,13 +61,22 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - README.md
63
63
  - Rakefile
64
+ - app/cells/decidim/verifications/authorization_metadata/show.erb
65
+ - app/cells/decidim/verifications/authorization_metadata_cell.rb
66
+ - app/cells/decidim/verifications/revocations/show.erb
67
+ - app/cells/decidim/verifications/revocations_cell.rb
64
68
  - app/commands/decidim/verifications/authorize_user.rb
65
69
  - app/commands/decidim/verifications/confirm_user_authorization.rb
66
70
  - app/commands/decidim/verifications/csv_census/admin/create_census_data.rb
67
71
  - app/commands/decidim/verifications/csv_census/confirm_census_authorization.rb
72
+ - app/commands/decidim/verifications/destroy_user_authorization.rb
68
73
  - app/commands/decidim/verifications/id_documents/admin/confirm_user_offline_authorization.rb
69
74
  - app/commands/decidim/verifications/id_documents/admin/update_config.rb
70
75
  - app/commands/decidim/verifications/perform_authorization_step.rb
76
+ - app/commands/decidim/verifications/revoke_all_authorizations.rb
77
+ - app/commands/decidim/verifications/revoke_by_condition_authorizations.rb
78
+ - app/controllers/concerns/decidim/verifications/renewable.rb
79
+ - app/controllers/decidim/verifications/admin/verifications_controller.rb
71
80
  - app/controllers/decidim/verifications/application_controller.rb
72
81
  - app/controllers/decidim/verifications/authorizations_controller.rb
73
82
  - app/controllers/decidim/verifications/csv_census/admin/census_controller.rb
@@ -82,6 +91,7 @@ files:
82
91
  - app/controllers/decidim/verifications/postal_letter/admin/postages_controller.rb
83
92
  - app/controllers/decidim/verifications/postal_letter/authorizations_controller.rb
84
93
  - app/controllers/decidim/verifications/sms/authorizations_controller.rb
94
+ - app/forms/decidim/verifications/admin/revocations_before_date_form.rb
85
95
  - app/forms/decidim/verifications/csv_census/admin/census_data_form.rb
86
96
  - app/forms/decidim/verifications/csv_census/census_form.rb
87
97
  - app/forms/decidim/verifications/id_documents/admin/config_form.rb
@@ -103,12 +113,14 @@ files:
103
113
  - app/presenters/decidim/verifications/id_documents/authorization_presenter.rb
104
114
  - app/presenters/decidim/verifications/postal_letter/authorization_presenter.rb
105
115
  - app/queries/decidim/verifications/authorizations.rb
116
+ - app/queries/decidim/verifications/authorizations_before_date.rb
106
117
  - app/services/decidim/authorization_handler.rb
107
118
  - app/uploaders/decidim/verifications/attachment_uploader.rb
108
119
  - app/views/decidim/verifications/authorizations/_granted_authorization.html.erb
109
120
  - app/views/decidim/verifications/authorizations/first_login.html.erb
110
121
  - app/views/decidim/verifications/authorizations/index.html.erb
111
122
  - app/views/decidim/verifications/authorizations/new.html.erb
123
+ - app/views/decidim/verifications/authorizations/renew_modal.html.erb
112
124
  - app/views/decidim/verifications/csv_census/admin/census/index.html.erb
113
125
  - app/views/decidim/verifications/csv_census/admin/census/instructions.html.erb
114
126
  - app/views/decidim/verifications/id_documents/admin/config/edit.html.erb
@@ -125,37 +137,72 @@ files:
125
137
  - app/views/decidim/verifications/sms/authorizations/edit.html.erb
126
138
  - app/views/decidim/verifications/sms/authorizations/new.html.erb
127
139
  - app/views/dummy_authorization/_form.html.erb
140
+ - config/locales/am-ET.yml
128
141
  - config/locales/ar-SA.yml
129
142
  - config/locales/ar.yml
143
+ - config/locales/bg-BG.yml
144
+ - config/locales/bg.yml
130
145
  - config/locales/ca.yml
131
146
  - config/locales/cs-CZ.yml
132
147
  - config/locales/cs.yml
148
+ - config/locales/da-DK.yml
149
+ - config/locales/da.yml
133
150
  - config/locales/de.yml
134
151
  - config/locales/el-GR.yml
152
+ - config/locales/el.yml
135
153
  - config/locales/en.yml
136
154
  - config/locales/eo-UY.yml
155
+ - config/locales/eo.yml
137
156
  - config/locales/es-MX.yml
138
157
  - config/locales/es-PY.yml
139
158
  - config/locales/es.yml
159
+ - config/locales/et-EE.yml
160
+ - config/locales/et.yml
140
161
  - config/locales/eu.yml
141
162
  - config/locales/fi-pl.yml
142
163
  - config/locales/fi-plain.yml
143
164
  - config/locales/fi.yml
165
+ - config/locales/fr-CA.yml
144
166
  - config/locales/fr.yml
167
+ - config/locales/ga-IE.yml
145
168
  - config/locales/gl.yml
169
+ - config/locales/hr-HR.yml
170
+ - config/locales/hr.yml
146
171
  - config/locales/hu.yml
147
172
  - config/locales/id-ID.yml
148
173
  - config/locales/is-IS.yml
174
+ - config/locales/is.yml
149
175
  - config/locales/it.yml
176
+ - config/locales/ja-JP.yml
177
+ - config/locales/ja.yml
178
+ - config/locales/ko-KR.yml
179
+ - config/locales/ko.yml
180
+ - config/locales/lt-LT.yml
181
+ - config/locales/lt.yml
182
+ - config/locales/lv.yml
183
+ - config/locales/mt-MT.yml
184
+ - config/locales/mt.yml
150
185
  - config/locales/nl.yml
151
186
  - config/locales/no.yml
187
+ - config/locales/om-ET.yml
152
188
  - config/locales/pl.yml
153
189
  - config/locales/pt-BR.yml
154
190
  - config/locales/pt.yml
191
+ - config/locales/ro-RO.yml
155
192
  - config/locales/ru.yml
193
+ - config/locales/sk-SK.yml
194
+ - config/locales/sk.yml
195
+ - config/locales/sl.yml
196
+ - config/locales/so-SO.yml
197
+ - config/locales/sr-CS.yml
156
198
  - config/locales/sv.yml
199
+ - config/locales/ti-ER.yml
157
200
  - config/locales/tr-TR.yml
158
201
  - config/locales/uk.yml
202
+ - config/locales/vi-VN.yml
203
+ - config/locales/vi.yml
204
+ - config/locales/zh-CN.yml
205
+ - config/locales/zh-TW.yml
159
206
  - db/migrate/20171030133426_move_authorizations_to_new_api.rb
160
207
  - db/migrate/20181227135423_create_decidim_verifications_csv_data.rb
161
208
  - lib/decidim/verifications.rb
@@ -204,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
251
  - !ruby/object:Gem::Version
205
252
  version: '0'
206
253
  requirements: []
207
- rubygems_version: 3.1.2
254
+ rubygems_version: 3.0.3
208
255
  signing_key:
209
256
  specification_version: 4
210
257
  summary: Decidim verifications module