decidim-verifications 0.14.4 → 0.15.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: 180fc93a235e5717a5e2db194a8985663317b166e91623fe65b65cf12e932f0e
4
- data.tar.gz: ec34dad240b1458c1117e5cf8efbd8ff41d63616fec3a94e2f58afbba676340f
3
+ metadata.gz: 34aab999207b99f0d2adaf5948cbec175a8cbf3fd558c6e275385654cc3a7102
4
+ data.tar.gz: 4b4974774dd7dc618039e4d9738668bacdb70f1490c2b2e4bcfa3a8373a9a8f8
5
5
  SHA512:
6
- metadata.gz: 36de5374a4a9fbae31ed9ed4ae9c2f4fbd72abc08979f2b459c566dc7bc4ed675cf2ad404c2dcf27eebe0ee30bdbdbcbe2449c5e2e4499d9e87c31d7788324af
7
- data.tar.gz: 1751e7c23fbcb50d424a292da400332a8f55b71730cf9eb99c84b589b6577bbd7bb7a2e19264f677ec08d3dccafe18416108c38497e0d82b5fac909cbe8ed361
6
+ metadata.gz: a7c77c04fe1849c8b90a20456d685ad330a3d8df844c57266ddbea1f0b25d9a47d2b65c41df675aa7b5074e3824dc81b04456d3d1f0954cbaa7df6db03fe187c
7
+ data.tar.gz: da7375d9374f61c0cc80588e6cde9e6bef482d90dd32240cf9eb8d49f79cd881a2ecec4150c2a522e27aebee8404193abc0867f6e5c13713d95ee1e0cbc94804
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Verifications
5
+ class ApplicationController < Decidim::ApplicationController
6
+ include NeedsPermission
7
+
8
+ before_action :confirmed_user, only: [:new, :create]
9
+
10
+ def new
11
+ raise NotImplementedError
12
+ end
13
+
14
+ def create
15
+ raise NotImplementedError
16
+ end
17
+
18
+ private
19
+
20
+ def confirmed_user
21
+ return true if !current_user || current_user && current_user.verifiable?
22
+
23
+ redirect_back(
24
+ fallback_location: root_path,
25
+ alert: t(
26
+ "authorizations.create.unconfirmed",
27
+ scope: "decidim.verifications"
28
+ )
29
+ ) && (return false)
30
+ end
31
+ end
32
+ end
33
+ end
@@ -4,7 +4,7 @@ module Decidim
4
4
  module Verifications
5
5
  # This controller allows users to create and destroy their authorizations. It
6
6
  # shouldn't be necessary to expand it to add new authorization schemes.
7
- class AuthorizationsController < Decidim::ApplicationController
7
+ class AuthorizationsController < ApplicationController
8
8
  helper_method :handler, :unauthorized_methods
9
9
  before_action :valid_handler, only: [:new, :create]
10
10
 
@@ -6,7 +6,7 @@ module Decidim
6
6
  #
7
7
  # Handles verification by identity document upload
8
8
  #
9
- class AuthorizationsController < Decidim::ApplicationController
9
+ class AuthorizationsController < ApplicationController
10
10
  helper_method :authorization
11
11
 
12
12
  before_action :load_authorization
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Verifications
5
5
  module PostalLetter
6
- class AuthorizationsController < Decidim::ApplicationController
6
+ class AuthorizationsController < ApplicationController
7
7
  helper_method :authorization
8
8
 
9
9
  before_action :load_authorization
@@ -49,6 +49,7 @@ ca:
49
49
  create:
50
50
  error: S'ha produït un error en crear l'autorització.
51
51
  success: Has estat autoritzat amb èxit.
52
+ unconfirmed: Cal que confirmis el teu correu electrònic per a poder autoritzar-te.
52
53
  first_login:
53
54
  actions:
54
55
  another_dummy_authorization_handler: Verifiqueu contra un altre exemple de controlador d'autorització
@@ -49,6 +49,7 @@ de:
49
49
  create:
50
50
  error: Beim Erstellen der Autorisierung ist ein Fehler aufgetreten.
51
51
  success: Sie wurden erfolgreich autorisiert.
52
+ unconfirmed: Sie müssen Ihre E-Mail bestätigen, um sich zu autorisieren.
52
53
  first_login:
53
54
  actions:
54
55
  another_dummy_authorization_handler: Überprüfen Sie anhand eines anderen Beispiels des Autorisierungshandlers
@@ -50,6 +50,7 @@ en:
50
50
  create:
51
51
  error: There was an error creating the authorization.
52
52
  success: You've been successfully authorized.
53
+ unconfirmed: You need to confirm your email in order to authorize yourself.
53
54
  first_login:
54
55
  actions:
55
56
  another_dummy_authorization_handler: Verify against another example of authorization handler
@@ -49,6 +49,7 @@ es-PY:
49
49
  create:
50
50
  error: Hubo un error al crear la autorización.
51
51
  success: Has sido autorizado/a correctamente.
52
+ unconfirmed: Necesitas confirmar tu correo electrónico para autorizarte.
52
53
  first_login:
53
54
  actions:
54
55
  another_dummy_authorization_handler: Verificar contra otro ejemplo de controlador de autorización
@@ -49,6 +49,7 @@ es:
49
49
  create:
50
50
  error: Hubo un error al crear la autorización.
51
51
  success: Has sido autorizado/a correctamente.
52
+ unconfirmed: Necesitas confirmar tu correo electrónico para autorizarte.
52
53
  first_login:
53
54
  actions:
54
55
  another_dummy_authorization_handler: Verificar contra otro ejemplo de controlador de autorización
@@ -49,6 +49,7 @@ eu:
49
49
  create:
50
50
  error: Errore bat gertatu da baimena sortzean.
51
51
  success: Ongi baimendu duzu.
52
+ unconfirmed: Zure posta elektronikoa baieztatzeko, baimena eman behar duzu.
52
53
  first_login:
53
54
  actions:
54
55
  another_dummy_authorization_handler: Egiaztatu baimenen kudeatzailearen beste adibide baten aurka
@@ -49,6 +49,7 @@ fi:
49
49
  create:
50
50
  error: Vahvistuksen luonnissa tapahtui virhe.
51
51
  success: Tilisi on onnistuneesti vahvistettu.
52
+ unconfirmed: Sinun on vahvistettava sähköpostisi valtuuttaksesi käyttäjätilisi.
52
53
  first_login:
53
54
  actions:
54
55
  another_dummy_authorization_handler: Varmista toisen esimerkkivahvistustavan käsittelijällä
@@ -49,6 +49,7 @@ fr:
49
49
  create:
50
50
  error: Une erreur s'est produite lors de la création de l'autorisation.
51
51
  success: Vous avez été autorisé avec succès.
52
+ unconfirmed: Vous devez confirmer votre email pour vous autoriser.
52
53
  first_login:
53
54
  actions:
54
55
  another_dummy_authorization_handler: Vérifier avec un autre exemple de gestionnaire d'autorisation
@@ -49,6 +49,7 @@ gl:
49
49
  create:
50
50
  error: Produciuse un erro ao crear a autorización.
51
51
  success: Autorizouse con éxito.
52
+ unconfirmed: Debes confirmar o teu correo electrónico para autorizarte.
52
53
  first_login:
53
54
  actions:
54
55
  another_dummy_authorization_handler: Verifique contra outro exemplo de controlador de autorización
@@ -49,6 +49,7 @@ hu:
49
49
  create:
50
50
  error: Hiba történt az engedélyezés létrehozása során.
51
51
  success: Az engedélyezésed sikeres volt.
52
+ unconfirmed: Meg kell erősítened az e-mailedet, hogy engedélyezd magad.
52
53
  first_login:
53
54
  actions:
54
55
  another_dummy_authorization_handler: Ellenőrizd az engedélykezelő másik példáját
@@ -49,6 +49,7 @@ it:
49
49
  create:
50
50
  error: Si è verificato un errore durante la creazione dell'autorizzazione.
51
51
  success: Sei stato autorizzato con successo.
52
+ unconfirmed: Devi confermare la tua e-mail per autorizzarti.
52
53
  first_login:
53
54
  actions:
54
55
  another_dummy_authorization_handler: Verificare contro un altro esempio di gestore di autorizzazioni
@@ -49,6 +49,7 @@ nl:
49
49
  create:
50
50
  error: Er is een fout opgetreden bij het maken van de autorisatie.
51
51
  success: U bent geautoriseerd.
52
+ unconfirmed: U moet uw e-mail bevestigen om uzelf te autoriseren.
52
53
  first_login:
53
54
  actions:
54
55
  another_dummy_authorization_handler: Controleer tegen een ander voorbeeld van autorisatieaanduiding
@@ -49,6 +49,7 @@ pl:
49
49
  create:
50
50
  error: Wystąpił błąd podczas tworzenia autoryzacji.
51
51
  success: Pomyślnie autoryzowano.
52
+ unconfirmed: Aby się autoryzować, musisz potwierdzić swój adres e-mail.
52
53
  first_login:
53
54
  actions:
54
55
  another_dummy_authorization_handler: Sprawdź na przykładzie innego przykładu procedury obsługi autoryzacji
@@ -49,6 +49,7 @@ pt-BR:
49
49
  create:
50
50
  error: Ocorreu um erro ao criar a autorização.
51
51
  success: Você foi autorizado com sucesso.
52
+ unconfirmed: Você precisa confirmar seu e-mail para se autorizar.
52
53
  first_login:
53
54
  actions:
54
55
  another_dummy_authorization_handler: Verificar contra outro exemplo de manipulador de autorização
@@ -49,6 +49,7 @@ pt:
49
49
  create:
50
50
  error: Ocorreu um erro ao criar a autorização.
51
51
  success: Você foi autorizado com sucesso.
52
+ unconfirmed: Você precisa confirmar seu e-mail para se autorizar.
52
53
  first_login:
53
54
  actions:
54
55
  another_dummy_authorization_handler: Verificar contra outro exemplo de manipulador de autorização
@@ -49,6 +49,7 @@ sv:
49
49
  create:
50
50
  error: Ett fel uppstod när auktoriseringen skulle skapas.
51
51
  success: Du har framgångsrikt auktoriserats.
52
+ unconfirmed: Du måste bekräfta din e-post för att auktorisera dig själv.
52
53
  first_login:
53
54
  actions:
54
55
  another_dummy_authorization_handler: Verifiera mot ett annat exempel på behörighetshanteraren
@@ -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.14.4"
7
+ "0.15.0"
8
8
  end
9
9
  end
10
10
  end
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.14.4
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rodriguez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-24 00:00:00.000000000 Z
11
+ date: 2018-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.14.4
19
+ version: 0.15.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.14.4
26
+ version: 0.15.0
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.14.4
33
+ version: 0.15.0
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.14.4
40
+ version: 0.15.0
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.14.4
47
+ version: 0.15.0
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.14.4
54
+ version: 0.15.0
55
55
  description: Several verification methods for your decidim instance
56
56
  email:
57
57
  - deivid.rodriguez@riseup.net
@@ -64,6 +64,7 @@ files:
64
64
  - app/commands/decidim/verifications/authorize_user.rb
65
65
  - app/commands/decidim/verifications/confirm_user_authorization.rb
66
66
  - app/commands/decidim/verifications/perform_authorization_step.rb
67
+ - app/controllers/decidim/verifications/application_controller.rb
67
68
  - app/controllers/decidim/verifications/authorizations_controller.rb
68
69
  - app/controllers/decidim/verifications/id_documents/admin/confirmations_controller.rb
69
70
  - app/controllers/decidim/verifications/id_documents/admin/pending_authorizations_controller.rb
@@ -152,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
153
  version: '0'
153
154
  requirements: []
154
155
  rubyforge_project:
155
- rubygems_version: 2.7.7
156
+ rubygems_version: 2.7.6
156
157
  signing_key:
157
158
  specification_version: 4
158
159
  summary: Decidim verifications module