decidim-direct_verifications 0.2.1 → 0.2.2

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: ae13353ab85ad680dd8fd7381d49b39b221e559cdb1f2cd57f1e17d98f57ee59
4
- data.tar.gz: b0520601eeaecf1de2a45daeca3c7049d9fb3837065b6d5f9ddcda577c256865
3
+ metadata.gz: 3ad632a7bef5ab98d4f990f5587e327555eca761460b3101a6abbcc7f3e23ff3
4
+ data.tar.gz: b4886c0e6960a4272a3e90158f4deac8ae097775394dbe8397078e0547c8ce0a
5
5
  SHA512:
6
- metadata.gz: 7619fadbbfa9c45c0f64ac5f8df202becc746edea83c30844ffefa1c0d57757aeb44985cbe180a027bc98d048f3848cb195d599bef99fc65d675064c789be83a
7
- data.tar.gz: 59bf927a678ccb3b95b5aec4c09d553444d7026855b8fab486cf9aa874284075f033bb120804458a8c960c0d22cb073ef3e452fdc00d2908f2c86eb971f65258
6
+ metadata.gz: eba1aa60e620a0d252af787d93e5136524a3eb20e3ce35b3ebf4fe317aad32fd621631fc856012e84ef3f81c65791dd0f7f9169c25600faf210b346c5f66a1f7
7
+ data.tar.gz: 643c6ed06c6b997684b0c0e6280554300f071cbe029b52320a433a8382c463981818c8e321e0057c4697e9dc13a0cc2faa3d89c2a3e51f1bda2f4a8a186efebf
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Decidim::DirectVerifications
2
2
 
3
- 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.
3
+ [![Build Status](https://travis-ci.org/Platoniq/decidim-verifications-direct_verifications.svg?branch=master)](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
+ ![Admin screenshot](examples/screenshot.png)
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
 
@@ -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 registrats, dels quals %{registered}
23
- estan registrats, %{unconfirmed} sense confirmar i %{authorized} autoritzats
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)
@@ -1,6 +1,12 @@
1
1
  ---
2
2
  en:
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:
@@ -1,6 +1,12 @@
1
1
  ---
2
2
  es:
3
3
  decidim:
4
+ admin:
5
+ models:
6
+ user:
7
+ fields:
8
+ roles:
9
+ participant: Participante
4
10
  authorization_handlers:
5
11
  admin:
6
12
  direct_verifications:
@@ -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
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-direct_verifications version.
5
5
  module DirectVerifications
6
6
  def self.version
7
- "0.2.1"
7
+ "0.2.2"
8
8
  end
9
9
 
10
10
  def self.decidim_version
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.1
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-01 00:00:00.000000000 Z
11
+ date: 2019-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-admin