decidim-verifications 0.12.2 → 0.13.0.pre1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b80b82acd6db149fc1800770d5a431ea39447a54863b09d3eb002c6c3535699
|
4
|
+
data.tar.gz: f42b9b8390da9115377534615c088cb2b2d9c30be0a160e688c48e3d45ed5545
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 965a812085354274e2563250db356573460c9e9ea42bd04998322d88f1287dc1bc022a46e58193dc326b856df1a3fdbdc460409bb59b03519a96a3758e15db7b
|
7
|
+
data.tar.gz: 584d5cfeb76b2197125da1ba3edf86418b5163b2d68b14c5ac88acd779895b4c4d39b6e1e2906bc833eaf057728ce342794c9db482cdfc7532f01eef092362f3
|
data/README.md
CHANGED
@@ -144,8 +144,9 @@ implement its public methods:
|
|
144
144
|
|
145
145
|
* The `initialize` method receives the current authorization process context and
|
146
146
|
saves it in local variables. This include the current authorization user state
|
147
|
-
(an `Authorization` record)
|
148
|
-
trying to perform
|
147
|
+
(an `Authorization` record), permission `options` related to the action is
|
148
|
+
trying to perform and the current `component` where the authorization is taking
|
149
|
+
place.
|
149
150
|
|
150
151
|
* The `authorize` method is responsible of evaluating the authorization process
|
151
152
|
context and determine if the user authorization is `:ok` or in any other
|
data/config/locales/fr.yml
CHANGED
@@ -54,13 +54,13 @@ fr:
|
|
54
54
|
another_dummy_authorization_handler: Vérifier avec un autre exemple de gestionnaire d'autorisation
|
55
55
|
dummy_authorization_handler: Vérifier en comparant avec l'exemple du gestionnaire d'autorisation
|
56
56
|
dummy_authorization_workflow: Vérifiez par rapport à l'exemple de procédure d'autorisation
|
57
|
-
id_documents:
|
58
|
-
postal_letter:
|
57
|
+
id_documents: Soyez vérifié en téléchargeant votre document d'identité
|
58
|
+
postal_letter: Faites-vous vérifier en recevant un code de vérification par courrier postal
|
59
59
|
title: Vérifier votre Identité
|
60
|
-
verify_with_these_options: 'Voici les options disponibles pour vérifier votre
|
60
|
+
verify_with_these_options: 'Voici les options disponibles pour vérifier votre identité:'
|
61
61
|
new:
|
62
62
|
authorize: Envoyer
|
63
|
-
authorize_with: Vérifier
|
63
|
+
authorize_with: Vérifier avec %{authorizer}
|
64
64
|
skip_verification: Vous pouvez omettre cette étape pour le moment et %{link}
|
65
65
|
start_exploring: commencer à explorer
|
66
66
|
dummy_authorization:
|
@@ -121,7 +121,7 @@ fr:
|
|
121
121
|
authorizations:
|
122
122
|
create:
|
123
123
|
error: Il y a eu un problème avec votre demande
|
124
|
-
success: Merci
|
124
|
+
success: Merci! Nous enverrons un code de vérification à votre adresse
|
125
125
|
edit:
|
126
126
|
send: Confirmer
|
127
127
|
title: Introduisez le code de vérification que vous avez reçu
|
@@ -131,7 +131,7 @@ fr:
|
|
131
131
|
title: Demandez votre code de vérification
|
132
132
|
update:
|
133
133
|
error: Votre code de vérification ne correspond pas au nôtre. Veuillez vérifier la lettre que nous vous avons envoyée
|
134
|
-
success:
|
134
|
+
success: Toutes nos félicitations. Vous avez été vérifié avec succès
|
135
135
|
errors:
|
136
136
|
messages:
|
137
|
-
uppercase_only_letters_numbers:
|
137
|
+
uppercase_only_letters_numbers: tout doit être en majuscule et ne contenir que des lettres et / ou des chiffres
|
@@ -78,11 +78,12 @@ module Decidim
|
|
78
78
|
#
|
79
79
|
# authorization - The existing authorization record to be evaluated. Can be nil.
|
80
80
|
# options - A hash with options related only to the current authorization process.
|
81
|
+
# component - The component where the authorization is taking place
|
81
82
|
#
|
82
83
|
# Returns the result of authorization handler check. Check Decidim::Verifications::DefaultActionAuthorizer class docs.
|
83
84
|
#
|
84
|
-
def authorize(authorization, options)
|
85
|
-
@action_authorizer = @manifest.action_authorizer_class.new(authorization, options)
|
85
|
+
def authorize(authorization, options, component)
|
86
|
+
@action_authorizer = @manifest.action_authorizer_class.new(authorization, options, component)
|
86
87
|
@action_authorizer.authorize
|
87
88
|
end
|
88
89
|
|
@@ -8,10 +8,12 @@ module Decidim
|
|
8
8
|
#
|
9
9
|
# authorization - The existing authorization record to be evaluated. Can be nil.
|
10
10
|
# options - A hash with options related only to the current authorization process.
|
11
|
+
# component - The component where the authorization is taking place
|
11
12
|
#
|
12
|
-
def initialize(authorization, options)
|
13
|
+
def initialize(authorization, options, component)
|
13
14
|
@authorization = authorization
|
14
15
|
@options = options.deep_dup || {} # options hash is cloned to allow changes applied to it without risks
|
16
|
+
@component = component
|
15
17
|
end
|
16
18
|
|
17
19
|
#
|
@@ -63,7 +65,7 @@ module Decidim
|
|
63
65
|
|
64
66
|
protected
|
65
67
|
|
66
|
-
attr_reader :authorization, :options
|
68
|
+
attr_reader :authorization, :options, :component
|
67
69
|
|
68
70
|
def unmatched_fields
|
69
71
|
@unmatched_fields ||= (options.keys & authorization.metadata.to_h.keys).each_with_object({}) do |field, unmatched|
|
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-verifications
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0.pre1
|
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-
|
11
|
+
date: 2018-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-core
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.13.a
|
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.
|
26
|
+
version: 0.13.a
|
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.
|
33
|
+
version: 0.13.a
|
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.
|
40
|
+
version: 0.13.a
|
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.
|
47
|
+
version: 0.13.a
|
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.
|
54
|
+
version: 0.13.a
|
55
55
|
description: Several verification methods for your decidim instance
|
56
56
|
email:
|
57
57
|
- deivid.rodriguez@riseup.net
|
@@ -145,9 +145,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
147
|
requirements:
|
148
|
-
- - "
|
148
|
+
- - ">"
|
149
149
|
- !ruby/object:Gem::Version
|
150
|
-
version:
|
150
|
+
version: 1.3.1
|
151
151
|
requirements: []
|
152
152
|
rubyforge_project:
|
153
153
|
rubygems_version: 2.7.6
|