decidim 0.27.0.rc1 → 0.27.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Rakefile +22 -4
- data/docs/modules/customize/pages/data_consent.adoc +113 -0
- data/docs/modules/customize/pages/styles.adoc +2 -2
- data/docs/modules/develop/pages/guide_development_with_localhost_ssl.adoc +44 -27
- data/lib/decidim/gem_manager.rb +23 -4
- data/lib/decidim/version.rb +1 -1
- data/package-lock.json +7 -7
- data/packages/browserslist-config/package.json +1 -1
- data/packages/core/package.json +1 -1
- data/packages/dev/package.json +1 -1
- data/packages/elections/package.json +1 -1
- data/packages/eslint-config/package.json +1 -1
- data/packages/stylelint-config/package.json +1 -1
- data/packages/webpacker/package.json +1 -1
- metadata +45 -45
- data/docs/modules/customize/pages/cookies.adoc +0 -109
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe67ba4aee0d8fe3f7d8daab9b13f506720ee35f2959d358493c676d4bf9ad1a
|
4
|
+
data.tar.gz: b288abd58afe36fd3f593a66e542a999551dc4eeaeea1fc72d723670f4d527a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 593b133468de4626c3d4bf68d0b90a81bdf70ce36d3160df7e19496c0aa9f0156b5f6a8de9685bb315eea8b8ef9dca559e84490c48cd12d2b261bb3c7db7b223
|
7
|
+
data.tar.gz: 6d129904287ce4f6c3a92207e583bf87fc4357a152f15d26d0f6566bd96806c934d02a079bdc54f0c82fbf7a88266b2866bba01db853442b905c28fbe3c35d33
|
data/Rakefile
CHANGED
@@ -57,14 +57,32 @@ task :uninstall_all do
|
|
57
57
|
end
|
58
58
|
|
59
59
|
desc "Pushes a new build for each gem and package."
|
60
|
-
task release_all: [:update_versions, :check_locale_completeness] do
|
61
|
-
|
62
|
-
Decidim::GemManager.
|
60
|
+
task release_all: [:update_versions, :check_uncommitted_changes, :check_locale_completeness] do
|
61
|
+
commands = {}
|
62
|
+
Decidim::GemManager.all_dirs { |dir| commands[dir] = "rake release" }
|
63
|
+
Decidim::GemManager.package_dirs { |dir| commands[dir] = "npm publish --access public" }
|
64
|
+
|
65
|
+
commands.each do |dir, command|
|
66
|
+
status = Decidim::GemManager.run_at(dir, command)
|
67
|
+
|
68
|
+
break if !status && Decidim::GemManager.fail_fast?
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
desc "Makes sure there are no uncommitted changes."
|
73
|
+
task :check_uncommitted_changes do
|
74
|
+
unless system("git diff --exit-code --quiet")
|
75
|
+
puts "There are uncommitted changes, run `git diff` to see them."
|
76
|
+
abort "Please commit your changes before release!"
|
77
|
+
end
|
63
78
|
end
|
64
79
|
|
65
80
|
desc "Makes sure all official locales are complete and clean."
|
66
81
|
task :check_locale_completeness do
|
67
|
-
system({ "ENFORCED_LOCALES" => "en,ca,es", "SKIP_NORMALIZATION" => "true" }, "rspec spec/i18n_spec.rb")
|
82
|
+
unless system({ "ENFORCED_LOCALES" => "en,ca,es", "SKIP_NORMALIZATION" => "true" }, "rspec spec/i18n_spec.rb")
|
83
|
+
puts "The officially supported locales have problems in them."
|
84
|
+
abort "Please correct these problems by following the instructions from the above outputs before release!"
|
85
|
+
end
|
68
86
|
end
|
69
87
|
|
70
88
|
load "decidim-dev/lib/tasks/generators.rake"
|
@@ -0,0 +1,113 @@
|
|
1
|
+
= Data consent (aka. "cookie consent")
|
2
|
+
|
3
|
+
With data consent we can explain better what local data we store in the user's browser, why we are storing this data, and let the user choose which data they allow to store in their browser.
|
4
|
+
|
5
|
+
This feature is many times referred to as "cookie consent" due to historic reasons but in Decidim we prefer to call it "data consent" because this can also include other data stored in the user's browser using its APIs, such as data added to LocalStorage.
|
6
|
+
|
7
|
+
As many non-technical people are still more familiar with the "cookie" terminology, the user interface talks only about "Cookie consent" to make it easier to understand for non-technical participants.
|
8
|
+
|
9
|
+
== Different data consent categories available in Decidim
|
10
|
+
|
11
|
+
By default there are four (4) data consent categories: **essential**, **preferences**, **analytics** and **marketing**. To display embedded iframes properly user has to give consent to all categories.
|
12
|
+
|
13
|
+
== Adding scripts which require data consent
|
14
|
+
|
15
|
+
The recommended place for scripts is ```app/views/layouts/decidim/_head_extra.html.erb```.
|
16
|
+
For example, if you want to add a script that requires marketing consent, you can add the following code:
|
17
|
+
|
18
|
+
[source,javascript]
|
19
|
+
----
|
20
|
+
<script type="text/plain" data-consent="marketing">
|
21
|
+
console.log("marketing data consent given");
|
22
|
+
</script>
|
23
|
+
----
|
24
|
+
|
25
|
+
NOTE: Script type should be "text/plain". Without that, user's data consent setting does not have any effect.
|
26
|
+
|
27
|
+
== Adding data consent category and related documentation
|
28
|
+
|
29
|
+
You are able to modify data consent categories via the `consent_gategories` configuration option.
|
30
|
+
|
31
|
+
For example if you want to add a "statistics" category you need to add following code to your app's initializer:
|
32
|
+
|
33
|
+
[source,ruby]
|
34
|
+
----
|
35
|
+
Decidim.configure do |config|
|
36
|
+
config.consent_categories = [
|
37
|
+
{
|
38
|
+
slug: "essential",
|
39
|
+
mandatory: true,
|
40
|
+
items: [
|
41
|
+
{
|
42
|
+
type: "cookie",
|
43
|
+
name: "_session_id"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
type: "cookie",
|
47
|
+
name: Decidim.consent_cookie_name
|
48
|
+
}
|
49
|
+
]
|
50
|
+
},
|
51
|
+
{
|
52
|
+
slug: "preferences",
|
53
|
+
mandatory: false
|
54
|
+
},
|
55
|
+
{
|
56
|
+
slug: "analytics",
|
57
|
+
mandatory: false
|
58
|
+
},
|
59
|
+
{
|
60
|
+
slug: "marketing",
|
61
|
+
mandatory: false
|
62
|
+
},
|
63
|
+
{
|
64
|
+
slug: "statistics",
|
65
|
+
mandatory: false,
|
66
|
+
items: [
|
67
|
+
type: "cookie",
|
68
|
+
name: "statistics-cookie"
|
69
|
+
]
|
70
|
+
}
|
71
|
+
]
|
72
|
+
end
|
73
|
+
----
|
74
|
+
|
75
|
+
When adding categories and items also remember to add the following xref:admin:texts.adoc[translations]:
|
76
|
+
|
77
|
+
For category:
|
78
|
+
|
79
|
+
[listing]
|
80
|
+
----
|
81
|
+
layouts.decidim.data_consent.modal.statistics.title
|
82
|
+
layouts.decidim.data_consent.modal.statistics.description
|
83
|
+
----
|
84
|
+
|
85
|
+
For data items (e.g. cookies):
|
86
|
+
|
87
|
+
[listing]
|
88
|
+
----
|
89
|
+
layouts.decidim.data_consent.details.items.statistics-cookie.description
|
90
|
+
layouts.decidim.data_consent.details.items.statistics-cookie.service
|
91
|
+
----
|
92
|
+
|
93
|
+
* Description explains the purpose of using this data
|
94
|
+
* Service explains the 3rd party service where this data is coming from
|
95
|
+
|
96
|
+
So, for instance for the English language (`en`), it would look like this:
|
97
|
+
|
98
|
+
[source,yaml]
|
99
|
+
----
|
100
|
+
en:
|
101
|
+
layouts:
|
102
|
+
decidim:
|
103
|
+
data_consent:
|
104
|
+
modal:
|
105
|
+
statistics:
|
106
|
+
title: The title for the statistics
|
107
|
+
description: The description for the statistics
|
108
|
+
details:
|
109
|
+
items:
|
110
|
+
statistics-cookie:
|
111
|
+
description: The purpose of the cookie
|
112
|
+
service: The 3rd party service of the cookie
|
113
|
+
----
|
@@ -56,8 +56,8 @@ Decidim uses Webpacker to compile assets. There are two ways to customize CSS:
|
|
56
56
|
|
57
57
|
1. if you want to redefine just CSS vars or Foundation settings, use _decidim-settings.scss
|
58
58
|
2. if you want to redefine a specific snippet of CSS (let's say a few classes but not a whole file) you can use decidim_application.scss
|
59
|
-
3. and of course you can overwrite whole files by copying them into the application i.e: to replace `decidim-core/app/packs/stylesheets/decidim/modules/
|
60
|
-
`app/packs/stylesheets/decidim/modules/
|
59
|
+
3. and of course you can overwrite whole files by copying them into the application i.e: to replace `decidim-core/app/packs/stylesheets/decidim/modules/_data-consent.scss` you should create in your Rails app a file in
|
60
|
+
`app/packs/stylesheets/decidim/modules/_data-consent.scss` and it will have more priority over the Decidim file.
|
61
61
|
|
62
62
|
We use http://sass-lang.com/guide[SASS, with SCSS syntax] as CSS preprocessor.
|
63
63
|
|
@@ -1,47 +1,28 @@
|
|
1
1
|
= Testing SSL in localhost
|
2
2
|
|
3
|
-
In some cases is useful to access the `localhost` environment under SSL (ie: `https://localhost:
|
3
|
+
In some cases is useful to access the `localhost` environment under SSL (ie: `https://localhost:3443/`).
|
4
4
|
|
5
5
|
A typical use case is when you want to test login integration with 3rd party systems using OAuth (which in the latest versions only the HTTPS protocol is allowed).
|
6
6
|
|
7
|
-
Using Puma, the default server for Rails, you can easily do the trick by creating a self-signed certificate and using it when starting your development environment.
|
7
|
+
Using Puma, the default server for Rails, you can easily do the trick by creating a self-signed certificate and using it when starting your development environment. A dummy certificate is shipped within the `decidim-dev` module which is usually included in the `:development` group of your `Gemfile`.
|
8
8
|
|
9
|
-
==
|
10
|
-
|
11
|
-
First you need a SSL certificate for the `localhost` domain (you only need to execute this command once):
|
12
|
-
|
13
|
-
[source,bash]
|
14
|
-
----
|
15
|
-
openssl req -x509 -out localhost.crt -keyout localhost.key \
|
16
|
-
-newkey rsa:2048 -nodes -sha256 \
|
17
|
-
-subj '/CN=localhost' -extensions EXT -config <( \
|
18
|
-
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
|
19
|
-
----
|
9
|
+
== Starting development in SSL mode
|
20
10
|
|
21
|
-
|
11
|
+
If you created the Decidim development app using the default development app generator, you already should have the necessary configurations for starting the development server under SSL. You can start the development server under SSL at port 3443 (default) using the following command:
|
22
12
|
|
23
13
|
[source,bash]
|
24
14
|
----
|
25
|
-
|
26
|
-
mv localhost.crt ~/certs/
|
27
|
-
mv localhost.key ~/certs/
|
15
|
+
DEV_SSL=true bin/rails s
|
28
16
|
----
|
29
17
|
|
30
|
-
|
18
|
+
Also make sure that the `decidim-dev` gem is included in the `:development` group of your `Gemfile` as it should be unless you changed it.
|
31
19
|
|
32
|
-
|
20
|
+
After that, you can start the development server under SSL at port 3443 (default) using the following command:
|
33
21
|
|
34
|
-
|
35
|
-
----
|
36
|
-
bin/rails s -b "ssl://127.0.0.1:3000?key=$HOME/certs/localhost.key&cert=$HOME/certs/localhost.crt"
|
37
|
-
----
|
38
|
-
|
39
|
-
Now you are ready to visit your favorite browser at the address `https://localhost:3000/` (note "https").
|
22
|
+
Now you are ready to visit your favorite browser at the address `https://localhost:3443/` (note "https" and port 3443). If you would like to test the non-SSL "http" version, it is also running normally at port 3000, so you can access that as you normally would.
|
40
23
|
|
41
24
|
Note: Your browser is going to complain as this is a self-signed certificate, that's ok for development, just add an exception and accept the certificate.
|
42
25
|
|
43
|
-
Also take into account that starting Puma in SSL mode will disable accessing it in non-ssl mode (normal `http` protocol).
|
44
|
-
|
45
26
|
== Testing tenants using lvh.me
|
46
27
|
|
47
28
|
You can also test the multi-tenant capabilities of Decidim by using alternative domains or subdomains that points to your local machine. `lvh.me` is a service that does just that without configuring anything in your machine (an alternative is to add entries in your `/etc/hosts` with a testing domain of your choice). Just point your browser to any subdomain of `lvh.me` and you'll be in your own machine.
|
@@ -61,3 +42,39 @@ Finally remember to add the port as `lvh.me` do not forwards anything, for insta
|
|
61
42
|
`https://anotherorg.lvh.me:3000/`
|
62
43
|
|
63
44
|
etc.
|
45
|
+
|
46
|
+
== Optional: Create your own self-signed certificate for localhost
|
47
|
+
|
48
|
+
If you don't want to rely on the dummy certificate shipped with the `decidim-dev` gem, you can also create the certificates yourself.
|
49
|
+
|
50
|
+
First you need a SSL certificate for the `localhost` domain (you only need to execute this command once):
|
51
|
+
|
52
|
+
[source,bash]
|
53
|
+
----
|
54
|
+
openssl req -x509 -out localhost.crt -keyout localhost.key \
|
55
|
+
-newkey rsa:2048 -nodes -sha256 \
|
56
|
+
-subj '/CN=localhost' -extensions EXT -config <( \
|
57
|
+
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
|
58
|
+
----
|
59
|
+
|
60
|
+
This will generate two files: `localhost.crt` and `localhost.key`, you can store them anywhere you want to use them later. In this example we'll suppose we have them in the folder `certs` in our root user home:
|
61
|
+
|
62
|
+
[source,bash]
|
63
|
+
----
|
64
|
+
mkdir ~/certs/
|
65
|
+
mv localhost.crt ~/certs/
|
66
|
+
mv localhost.key ~/certs/
|
67
|
+
----
|
68
|
+
|
69
|
+
== Optional: Manually starting development server in SSL mode
|
70
|
+
|
71
|
+
Once you have your certificate is generated, just use the next command in order to start puma instead of the typical `bin/rails s`:
|
72
|
+
|
73
|
+
[source,bash]
|
74
|
+
----
|
75
|
+
bin/rails s -b "ssl://127.0.0.1:3443?key=$HOME/certs/localhost.key&cert=$HOME/certs/localhost.crt"
|
76
|
+
----
|
77
|
+
|
78
|
+
Now you are ready to visit your favorite browser at the address `https://localhost:3443/` (note "https" and port 3443).
|
79
|
+
|
80
|
+
Take into account that starting Puma in SSL mode manually will disable accessing it in non-ssl mode (normal `http` protocol).
|
data/lib/decidim/gem_manager.rb
CHANGED
@@ -134,20 +134,31 @@ module Decidim
|
|
134
134
|
|
135
135
|
def run_all(command, out: $stdout, include_root: true)
|
136
136
|
all_dirs(include_root: include_root) do |dir|
|
137
|
-
status =
|
137
|
+
status = run_at(dir, command, out: out)
|
138
138
|
|
139
|
-
break
|
139
|
+
break if !status && fail_fast?
|
140
140
|
end
|
141
141
|
end
|
142
142
|
|
143
143
|
def run_packages(command, out: $stdout)
|
144
144
|
package_dirs do |dir|
|
145
|
-
status =
|
145
|
+
status = run_at(dir, command, out: out)
|
146
146
|
|
147
|
-
break
|
147
|
+
break if !status && fail_fast?
|
148
148
|
end
|
149
149
|
end
|
150
150
|
|
151
|
+
def run_at(dir, command, out: $stdout)
|
152
|
+
attempts = 0
|
153
|
+
until (status = new(dir).run(command, out: out))
|
154
|
+
attempts += 1
|
155
|
+
|
156
|
+
break if attempts > Decidim::GemManager.retry_times
|
157
|
+
end
|
158
|
+
|
159
|
+
status
|
160
|
+
end
|
161
|
+
|
151
162
|
def version
|
152
163
|
@version ||= File.read(version_file).strip
|
153
164
|
end
|
@@ -179,6 +190,14 @@ module Decidim
|
|
179
190
|
a_version.gsub(/\.pre/, "-pre").gsub(/\.dev/, "-dev").gsub(/.rc(\d*)/, "-rc\\1")
|
180
191
|
end
|
181
192
|
|
193
|
+
def fail_fast?
|
194
|
+
ENV.fetch("FAIL_FAST", nil) != "false"
|
195
|
+
end
|
196
|
+
|
197
|
+
def retry_times
|
198
|
+
ENV.fetch("RETRY_TIMES", 10).to_i
|
199
|
+
end
|
200
|
+
|
182
201
|
private
|
183
202
|
|
184
203
|
def root
|
data/lib/decidim/version.rb
CHANGED
data/package-lock.json
CHANGED
@@ -17363,12 +17363,12 @@
|
|
17363
17363
|
},
|
17364
17364
|
"packages/browserslist-config": {
|
17365
17365
|
"name": "@decidim/browserslist-config",
|
17366
|
-
"version": "0.27.0
|
17366
|
+
"version": "0.27.0",
|
17367
17367
|
"license": "AGPL-3.0"
|
17368
17368
|
},
|
17369
17369
|
"packages/core": {
|
17370
17370
|
"name": "@decidim/core",
|
17371
|
-
"version": "0.27.0
|
17371
|
+
"version": "0.27.0",
|
17372
17372
|
"license": "AGPL-3.0",
|
17373
17373
|
"dependencies": {
|
17374
17374
|
"@joeattardi/emoji-button": "^4.6.2",
|
@@ -17423,7 +17423,7 @@
|
|
17423
17423
|
},
|
17424
17424
|
"packages/dev": {
|
17425
17425
|
"name": "@decidim/dev",
|
17426
|
-
"version": "0.27.0
|
17426
|
+
"version": "0.27.0",
|
17427
17427
|
"dev": true,
|
17428
17428
|
"license": "AGPL-3.0",
|
17429
17429
|
"dependencies": {
|
@@ -17432,7 +17432,7 @@
|
|
17432
17432
|
},
|
17433
17433
|
"packages/elections": {
|
17434
17434
|
"name": "@decidim/elections",
|
17435
|
-
"version": "0.27.0
|
17435
|
+
"version": "0.27.0",
|
17436
17436
|
"license": "AGPL-3.0",
|
17437
17437
|
"dependencies": {
|
17438
17438
|
"@decidim/decidim-bulletin_board": "0.23.0",
|
@@ -17442,7 +17442,7 @@
|
|
17442
17442
|
},
|
17443
17443
|
"packages/eslint-config": {
|
17444
17444
|
"name": "@decidim/eslint-config",
|
17445
|
-
"version": "0.27.0
|
17445
|
+
"version": "0.27.0",
|
17446
17446
|
"dev": true,
|
17447
17447
|
"license": "AGPL-3.0",
|
17448
17448
|
"peerDependencies": {
|
@@ -17459,7 +17459,7 @@
|
|
17459
17459
|
},
|
17460
17460
|
"packages/stylelint-config": {
|
17461
17461
|
"name": "@decidim/stylelint-config",
|
17462
|
-
"version": "0.27.0
|
17462
|
+
"version": "0.27.0",
|
17463
17463
|
"dev": true,
|
17464
17464
|
"license": "AGPL-3.0",
|
17465
17465
|
"peerDependencies": {
|
@@ -17468,7 +17468,7 @@
|
|
17468
17468
|
},
|
17469
17469
|
"packages/webpacker": {
|
17470
17470
|
"name": "@decidim/webpacker",
|
17471
|
-
"version": "0.27.0
|
17471
|
+
"version": "0.27.0",
|
17472
17472
|
"license": "AGPL-3.0",
|
17473
17473
|
"dependencies": {
|
17474
17474
|
"@babel/core": "^7.15.5",
|
data/packages/core/package.json
CHANGED
data/packages/dev/package.json
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.27.0
|
4
|
+
version: 0.27.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-
|
13
|
+
date: 2022-09-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: decidim-accountability
|
@@ -18,280 +18,280 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.27.0
|
21
|
+
version: 0.27.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.27.0
|
28
|
+
version: 0.27.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: decidim-admin
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.27.0
|
35
|
+
version: 0.27.0
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.27.0
|
42
|
+
version: 0.27.0
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: decidim-api
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.27.0
|
49
|
+
version: 0.27.0
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.27.0
|
56
|
+
version: 0.27.0
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: decidim-assemblies
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 0.27.0
|
63
|
+
version: 0.27.0
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - '='
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 0.27.0
|
70
|
+
version: 0.27.0
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: decidim-blogs
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
75
|
- - '='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0.27.0
|
77
|
+
version: 0.27.0
|
78
78
|
type: :runtime
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - '='
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
version: 0.27.0
|
84
|
+
version: 0.27.0
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: decidim-budgets
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
89
|
- - '='
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version: 0.27.0
|
91
|
+
version: 0.27.0
|
92
92
|
type: :runtime
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - '='
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version: 0.27.0
|
98
|
+
version: 0.27.0
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: decidim-comments
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
103
|
- - '='
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: 0.27.0
|
105
|
+
version: 0.27.0
|
106
106
|
type: :runtime
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - '='
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: 0.27.0
|
112
|
+
version: 0.27.0
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: decidim-core
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
117
|
- - '='
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: 0.27.0
|
119
|
+
version: 0.27.0
|
120
120
|
type: :runtime
|
121
121
|
prerelease: false
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
124
|
- - '='
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version: 0.27.0
|
126
|
+
version: 0.27.0
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
128
|
name: decidim-debates
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
131
|
- - '='
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: 0.27.0
|
133
|
+
version: 0.27.0
|
134
134
|
type: :runtime
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
requirements:
|
138
138
|
- - '='
|
139
139
|
- !ruby/object:Gem::Version
|
140
|
-
version: 0.27.0
|
140
|
+
version: 0.27.0
|
141
141
|
- !ruby/object:Gem::Dependency
|
142
142
|
name: decidim-forms
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|
144
144
|
requirements:
|
145
145
|
- - '='
|
146
146
|
- !ruby/object:Gem::Version
|
147
|
-
version: 0.27.0
|
147
|
+
version: 0.27.0
|
148
148
|
type: :runtime
|
149
149
|
prerelease: false
|
150
150
|
version_requirements: !ruby/object:Gem::Requirement
|
151
151
|
requirements:
|
152
152
|
- - '='
|
153
153
|
- !ruby/object:Gem::Version
|
154
|
-
version: 0.27.0
|
154
|
+
version: 0.27.0
|
155
155
|
- !ruby/object:Gem::Dependency
|
156
156
|
name: decidim-generators
|
157
157
|
requirement: !ruby/object:Gem::Requirement
|
158
158
|
requirements:
|
159
159
|
- - '='
|
160
160
|
- !ruby/object:Gem::Version
|
161
|
-
version: 0.27.0
|
161
|
+
version: 0.27.0
|
162
162
|
type: :runtime
|
163
163
|
prerelease: false
|
164
164
|
version_requirements: !ruby/object:Gem::Requirement
|
165
165
|
requirements:
|
166
166
|
- - '='
|
167
167
|
- !ruby/object:Gem::Version
|
168
|
-
version: 0.27.0
|
168
|
+
version: 0.27.0
|
169
169
|
- !ruby/object:Gem::Dependency
|
170
170
|
name: decidim-meetings
|
171
171
|
requirement: !ruby/object:Gem::Requirement
|
172
172
|
requirements:
|
173
173
|
- - '='
|
174
174
|
- !ruby/object:Gem::Version
|
175
|
-
version: 0.27.0
|
175
|
+
version: 0.27.0
|
176
176
|
type: :runtime
|
177
177
|
prerelease: false
|
178
178
|
version_requirements: !ruby/object:Gem::Requirement
|
179
179
|
requirements:
|
180
180
|
- - '='
|
181
181
|
- !ruby/object:Gem::Version
|
182
|
-
version: 0.27.0
|
182
|
+
version: 0.27.0
|
183
183
|
- !ruby/object:Gem::Dependency
|
184
184
|
name: decidim-pages
|
185
185
|
requirement: !ruby/object:Gem::Requirement
|
186
186
|
requirements:
|
187
187
|
- - '='
|
188
188
|
- !ruby/object:Gem::Version
|
189
|
-
version: 0.27.0
|
189
|
+
version: 0.27.0
|
190
190
|
type: :runtime
|
191
191
|
prerelease: false
|
192
192
|
version_requirements: !ruby/object:Gem::Requirement
|
193
193
|
requirements:
|
194
194
|
- - '='
|
195
195
|
- !ruby/object:Gem::Version
|
196
|
-
version: 0.27.0
|
196
|
+
version: 0.27.0
|
197
197
|
- !ruby/object:Gem::Dependency
|
198
198
|
name: decidim-participatory_processes
|
199
199
|
requirement: !ruby/object:Gem::Requirement
|
200
200
|
requirements:
|
201
201
|
- - '='
|
202
202
|
- !ruby/object:Gem::Version
|
203
|
-
version: 0.27.0
|
203
|
+
version: 0.27.0
|
204
204
|
type: :runtime
|
205
205
|
prerelease: false
|
206
206
|
version_requirements: !ruby/object:Gem::Requirement
|
207
207
|
requirements:
|
208
208
|
- - '='
|
209
209
|
- !ruby/object:Gem::Version
|
210
|
-
version: 0.27.0
|
210
|
+
version: 0.27.0
|
211
211
|
- !ruby/object:Gem::Dependency
|
212
212
|
name: decidim-proposals
|
213
213
|
requirement: !ruby/object:Gem::Requirement
|
214
214
|
requirements:
|
215
215
|
- - '='
|
216
216
|
- !ruby/object:Gem::Version
|
217
|
-
version: 0.27.0
|
217
|
+
version: 0.27.0
|
218
218
|
type: :runtime
|
219
219
|
prerelease: false
|
220
220
|
version_requirements: !ruby/object:Gem::Requirement
|
221
221
|
requirements:
|
222
222
|
- - '='
|
223
223
|
- !ruby/object:Gem::Version
|
224
|
-
version: 0.27.0
|
224
|
+
version: 0.27.0
|
225
225
|
- !ruby/object:Gem::Dependency
|
226
226
|
name: decidim-sortitions
|
227
227
|
requirement: !ruby/object:Gem::Requirement
|
228
228
|
requirements:
|
229
229
|
- - '='
|
230
230
|
- !ruby/object:Gem::Version
|
231
|
-
version: 0.27.0
|
231
|
+
version: 0.27.0
|
232
232
|
type: :runtime
|
233
233
|
prerelease: false
|
234
234
|
version_requirements: !ruby/object:Gem::Requirement
|
235
235
|
requirements:
|
236
236
|
- - '='
|
237
237
|
- !ruby/object:Gem::Version
|
238
|
-
version: 0.27.0
|
238
|
+
version: 0.27.0
|
239
239
|
- !ruby/object:Gem::Dependency
|
240
240
|
name: decidim-surveys
|
241
241
|
requirement: !ruby/object:Gem::Requirement
|
242
242
|
requirements:
|
243
243
|
- - '='
|
244
244
|
- !ruby/object:Gem::Version
|
245
|
-
version: 0.27.0
|
245
|
+
version: 0.27.0
|
246
246
|
type: :runtime
|
247
247
|
prerelease: false
|
248
248
|
version_requirements: !ruby/object:Gem::Requirement
|
249
249
|
requirements:
|
250
250
|
- - '='
|
251
251
|
- !ruby/object:Gem::Version
|
252
|
-
version: 0.27.0
|
252
|
+
version: 0.27.0
|
253
253
|
- !ruby/object:Gem::Dependency
|
254
254
|
name: decidim-system
|
255
255
|
requirement: !ruby/object:Gem::Requirement
|
256
256
|
requirements:
|
257
257
|
- - '='
|
258
258
|
- !ruby/object:Gem::Version
|
259
|
-
version: 0.27.0
|
259
|
+
version: 0.27.0
|
260
260
|
type: :runtime
|
261
261
|
prerelease: false
|
262
262
|
version_requirements: !ruby/object:Gem::Requirement
|
263
263
|
requirements:
|
264
264
|
- - '='
|
265
265
|
- !ruby/object:Gem::Version
|
266
|
-
version: 0.27.0
|
266
|
+
version: 0.27.0
|
267
267
|
- !ruby/object:Gem::Dependency
|
268
268
|
name: decidim-templates
|
269
269
|
requirement: !ruby/object:Gem::Requirement
|
270
270
|
requirements:
|
271
271
|
- - '='
|
272
272
|
- !ruby/object:Gem::Version
|
273
|
-
version: 0.27.0
|
273
|
+
version: 0.27.0
|
274
274
|
type: :runtime
|
275
275
|
prerelease: false
|
276
276
|
version_requirements: !ruby/object:Gem::Requirement
|
277
277
|
requirements:
|
278
278
|
- - '='
|
279
279
|
- !ruby/object:Gem::Version
|
280
|
-
version: 0.27.0
|
280
|
+
version: 0.27.0
|
281
281
|
- !ruby/object:Gem::Dependency
|
282
282
|
name: decidim-verifications
|
283
283
|
requirement: !ruby/object:Gem::Requirement
|
284
284
|
requirements:
|
285
285
|
- - '='
|
286
286
|
- !ruby/object:Gem::Version
|
287
|
-
version: 0.27.0
|
287
|
+
version: 0.27.0
|
288
288
|
type: :runtime
|
289
289
|
prerelease: false
|
290
290
|
version_requirements: !ruby/object:Gem::Requirement
|
291
291
|
requirements:
|
292
292
|
- - '='
|
293
293
|
- !ruby/object:Gem::Version
|
294
|
-
version: 0.27.0
|
294
|
+
version: 0.27.0
|
295
295
|
- !ruby/object:Gem::Dependency
|
296
296
|
name: bundler
|
297
297
|
requirement: !ruby/object:Gem::Requirement
|
@@ -376,7 +376,7 @@ files:
|
|
376
376
|
- docs/modules/customize/assets/images/original_user_menu.png
|
377
377
|
- docs/modules/customize/pages/authorizations.adoc
|
378
378
|
- docs/modules/customize/pages/code.adoc
|
379
|
-
- docs/modules/customize/pages/
|
379
|
+
- docs/modules/customize/pages/data_consent.adoc
|
380
380
|
- docs/modules/customize/pages/gemfile.adoc
|
381
381
|
- docs/modules/customize/pages/images.adoc
|
382
382
|
- docs/modules/customize/pages/index.adoc
|
@@ -2105,9 +2105,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2105
2105
|
version: '3.0'
|
2106
2106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2107
2107
|
requirements:
|
2108
|
-
- - "
|
2108
|
+
- - ">="
|
2109
2109
|
- !ruby/object:Gem::Version
|
2110
|
-
version:
|
2110
|
+
version: '0'
|
2111
2111
|
requirements: []
|
2112
2112
|
rubygems_version: 3.2.22
|
2113
2113
|
signing_key:
|
@@ -1,109 +0,0 @@
|
|
1
|
-
= Cookies
|
2
|
-
|
3
|
-
With cookie consent we can explain better what cookies do we use, why we're using these cookies, and let the user choose which cookies they want to use.
|
4
|
-
|
5
|
-
== Different cookie categories available in Decidim
|
6
|
-
|
7
|
-
By default there are four (4) cookie categories: **essential**, **preferences**, **analytics** and **marketing**. To display embedded iframes properly user has to give consent to all categories.
|
8
|
-
|
9
|
-
== Adding scripts which require cookie consent
|
10
|
-
|
11
|
-
The recommended place for scripts is ```app/views/layouts/decidim/_head_extra.html.erb```.
|
12
|
-
For example, if you want to add a script that requires marketing consent, you can add the following code:
|
13
|
-
|
14
|
-
[source,javascript]
|
15
|
-
----
|
16
|
-
<script type="text/plain" data-consent="marketing">
|
17
|
-
console.log('marketing cookies accepted');
|
18
|
-
</script>
|
19
|
-
----
|
20
|
-
|
21
|
-
NOTE: Script type should be "text/plain". Without that, user's cookie consent setting doesn't affect.
|
22
|
-
|
23
|
-
== Adding cookie category and cookie documentation
|
24
|
-
|
25
|
-
You are able to modify cookie categories via the `consent_gategories` configuration option.
|
26
|
-
|
27
|
-
For example if you want to add a "statistics" category you need to add following code to your app's initializer:
|
28
|
-
|
29
|
-
[source,ruby]
|
30
|
-
----
|
31
|
-
Decidim.configure do |config|
|
32
|
-
config.consent_categories = [
|
33
|
-
{
|
34
|
-
slug: "essential",
|
35
|
-
mandatory: true,
|
36
|
-
cookies: [
|
37
|
-
{
|
38
|
-
type: "cookie",
|
39
|
-
name: "_session_id"
|
40
|
-
},
|
41
|
-
{
|
42
|
-
type: "cookie",
|
43
|
-
name: Decidim.consent_cookie_name
|
44
|
-
}
|
45
|
-
]
|
46
|
-
},
|
47
|
-
{
|
48
|
-
slug: "preferences",
|
49
|
-
mandatory: false
|
50
|
-
},
|
51
|
-
{
|
52
|
-
slug: "analytics",
|
53
|
-
mandatory: false
|
54
|
-
},
|
55
|
-
{
|
56
|
-
slug: "marketing",
|
57
|
-
mandatory: false
|
58
|
-
},
|
59
|
-
{
|
60
|
-
slug: "statistics",
|
61
|
-
mandatory: false,
|
62
|
-
cookies: [
|
63
|
-
type: "cookie",
|
64
|
-
name: "statistics-cookie"
|
65
|
-
]
|
66
|
-
}
|
67
|
-
]
|
68
|
-
end
|
69
|
-
----
|
70
|
-
|
71
|
-
When adding cookie categories and cookies also remember to add the following xref:admin:texts.adoc[translations]:
|
72
|
-
|
73
|
-
For category:
|
74
|
-
|
75
|
-
[listing]
|
76
|
-
----
|
77
|
-
layouts.decidim.cookie_consent.modal.statistics.title
|
78
|
-
layouts.decidim.cookie_consent.modal.statistics.description
|
79
|
-
----
|
80
|
-
|
81
|
-
For cookie:
|
82
|
-
|
83
|
-
[listing]
|
84
|
-
----
|
85
|
-
layouts.decidim.cookie_consent.cookie_details.cookies.statistics-cookie.description
|
86
|
-
layouts.decidim.cookie_consent.cookie_details.cookies.statistics-cookie.service
|
87
|
-
----
|
88
|
-
|
89
|
-
* Description explains the purpose of using this cookie
|
90
|
-
* Service explains the 3rd party service where this cookie is coming from
|
91
|
-
|
92
|
-
So, for instance for the English language (`en`), it would look like this:
|
93
|
-
|
94
|
-
[source,yaml]
|
95
|
-
----
|
96
|
-
en:
|
97
|
-
layouts:
|
98
|
-
decidim:
|
99
|
-
cookie_consent:
|
100
|
-
modal:
|
101
|
-
statistics:
|
102
|
-
title: The title for the statistics
|
103
|
-
description: The description for the statistics
|
104
|
-
cookie_details:
|
105
|
-
cookies:
|
106
|
-
statistics-cookie:
|
107
|
-
description: The purpose of the cookie
|
108
|
-
service: The 3rd party service of the cookie
|
109
|
-
----
|