decidim-direct_verifications 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -3
- data/config/locales/ca.yml +8 -2
- data/config/locales/en.yml +6 -0
- data/config/locales/es.yml +6 -0
- data/lib/decidim/direct_verifications/user_processor.rb +13 -0
- data/lib/decidim/direct_verifications/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3ad632a7bef5ab98d4f990f5587e327555eca761460b3101a6abbcc7f3e23ff3
|
|
4
|
+
data.tar.gz: b4886c0e6960a4272a3e90158f4deac8ae097775394dbe8397078e0547c8ce0a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eba1aa60e620a0d252af787d93e5136524a3eb20e3ce35b3ebf4fe317aad32fd621631fc856012e84ef3f81c65791dd0f7f9169c25600faf210b346c5f66a1f7
|
|
7
|
+
data.tar.gz: 643c6ed06c6b997684b0c0e6280554300f071cbe029b52320a433a8382c463981818c8e321e0057c4697e9dc13a0cc2faa3d89c2a3e51f1bda2f4a8a186efebf
|
data/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Decidim::DirectVerifications
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://travis-ci.org/Platoniq/decidim-verifications-direct_verifications)
|
|
4
|
+
|
|
5
|
+
A [Decidim](https://github.com/decidim/decidim) that provides a verification method called `Direct verification`. Works only on the admin side, final users do not intervene in the verification process.
|
|
4
6
|
|
|
5
7
|
This plugin allows to verify users against the `Direct verification` method by default, but it is not limited to it, it can be used to directly verify users against any other method registered for the organization.
|
|
6
8
|
|
|
@@ -8,18 +10,22 @@ You can use this plugin in combination with the great [AccessRequests](https://g
|
|
|
8
10
|
|
|
9
11
|
**Other features include:**
|
|
10
12
|
|
|
11
|
-
1. Allows to massively register users directly in the platform prior (or independently) to verify them by sending them invite emails.
|
|
13
|
+
1. Allows to massively register users directly in the platform prior (or independently) to verify them by sending them invite emails.
|
|
12
14
|
> **IMPORTANT:**<br>
|
|
13
15
|
> You must only use this feature if you have explicit consent from your users, otherwise you might be violating the [GDPR](https://eugdpr.org/) regulation in EU.
|
|
14
16
|
2. Can massively revoke authorizations given to any user with any verification method available.
|
|
15
17
|
|
|
18
|
+
## Screenshot
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
16
22
|
## Usage
|
|
17
23
|
|
|
18
24
|
DirectVerifications will be available as a new verification method under Participants/Verifications.
|
|
19
25
|
|
|
20
26
|
Final users take no action, verification is 100% in the admin side.
|
|
21
27
|
|
|
22
|
-
Verifications can only be managed by the admins. They have available a simple textarea form where to put a list of emails with no special format required. Emails (and names if possible) are detected automatically.
|
|
28
|
+
Verifications can only be managed by the admins. They have available a simple textarea form where to put a list of emails with no special format required. Emails (and names if possible) are detected automatically.
|
|
23
29
|
|
|
24
30
|
With the detected list of emails admin have different options available:
|
|
25
31
|
|
data/config/locales/ca.yml
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
ca:
|
|
3
3
|
decidim:
|
|
4
|
+
admin:
|
|
5
|
+
models:
|
|
6
|
+
user:
|
|
7
|
+
fields:
|
|
8
|
+
roles:
|
|
9
|
+
participant: Participant
|
|
4
10
|
authorization_handlers:
|
|
5
11
|
admin:
|
|
6
12
|
direct_verifications:
|
|
@@ -19,8 +25,8 @@ ca:
|
|
|
19
25
|
create:
|
|
20
26
|
authorized: S'han verificat correctament %{authorized} usuaris utilitzant
|
|
21
27
|
[%{handler}] (%{count} detectats, %{errors} errors)
|
|
22
|
-
info: S'han detectat %{count} usuaris
|
|
23
|
-
|
|
28
|
+
info: S'han detectat %{count} usuaris, dels quals %{registered} estan
|
|
29
|
+
registrats, %{unconfirmed} sense confirmar i %{authorized} autoritzats
|
|
24
30
|
utilitzant [%{handler}]
|
|
25
31
|
registered: S'han registrat correctament %{registered} usuaris (%{count}
|
|
26
32
|
detectats, %{errors} errors)
|
data/config/locales/en.yml
CHANGED
data/config/locales/es.yml
CHANGED
|
@@ -27,6 +27,7 @@ module Decidim
|
|
|
27
27
|
InviteUser.call(form) do
|
|
28
28
|
on(:ok) do
|
|
29
29
|
add_processed :registered, email
|
|
30
|
+
log_action find_user(email)
|
|
30
31
|
end
|
|
31
32
|
on(:invalid) do
|
|
32
33
|
add_error :registered, email
|
|
@@ -125,6 +126,18 @@ module Decidim
|
|
|
125
126
|
def add_error(type, email)
|
|
126
127
|
@errors[type] << email unless @errors[type].include? email
|
|
127
128
|
end
|
|
129
|
+
|
|
130
|
+
def log_action(user)
|
|
131
|
+
Decidim.traceability.perform_action!(
|
|
132
|
+
"invite",
|
|
133
|
+
user,
|
|
134
|
+
current_user,
|
|
135
|
+
extra: {
|
|
136
|
+
invited_user_role: "participant",
|
|
137
|
+
invited_user_id: user.id
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
end
|
|
128
141
|
end
|
|
129
142
|
end
|
|
130
143
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: decidim-direct_verifications
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ivan Vergés
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-04-
|
|
11
|
+
date: 2019-04-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: decidim-admin
|