decidim 0.28.4 → 0.29.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/decidim-core/lib/decidim/webpacker/esbuild.config.js +14 -0
- data/decidim-core/lib/decidim/webpacker/shakapacker.yml +2 -2
- data/decidim-core/lib/decidim/webpacker/tsconfig.json +11 -0
- data/decidim-core/lib/decidim/webpacker/webpack/custom.js +13 -35
- data/decidim.gemspec +2 -1
- data/docs/README.adoc +2 -2
- data/docs/antora.yml +1 -1
- data/docs/modules/configure/pages/environment_variables.adoc +6 -102
- data/docs/modules/configure/pages/index.adoc +1 -1
- data/docs/modules/configure/pages/initializer.adoc +1 -1
- data/docs/modules/customize/pages/admin_filters.adoc +32 -0
- data/docs/modules/customize/pages/data_consent.adoc +1 -1
- data/docs/modules/customize/pages/index.adoc +2 -1
- data/docs/modules/customize/pages/javascript.adoc +2 -2
- data/docs/modules/customize/pages/logic.adoc +1 -1
- data/docs/modules/customize/pages/social_shares.adoc +2 -2
- data/docs/modules/customize/pages/styles.adoc +3 -3
- data/docs/modules/customize/pages/views.adoc +1 -1
- data/docs/modules/develop/pages/authorable.adoc +3 -3
- data/docs/modules/develop/pages/backports.adoc +6 -5
- data/docs/modules/develop/pages/c4_component.adoc +2 -7
- data/docs/modules/develop/pages/c4_container.adoc +1 -3
- data/docs/modules/develop/pages/c4_context.adoc +0 -2
- data/docs/modules/develop/pages/classes/commands.adoc +204 -25
- data/docs/modules/develop/pages/components.adoc +5 -5
- data/docs/modules/develop/pages/custom_seed_data.adoc +1 -1
- data/docs/modules/develop/pages/embeddable.adoc +1 -1
- data/docs/modules/develop/pages/endorsable.adoc +2 -2
- data/docs/modules/develop/pages/guide_conventions.adoc +6 -6
- data/docs/modules/develop/pages/guide_development_app.adoc +2 -1
- data/docs/modules/develop/pages/guide_example_apps.adoc +1 -1
- data/docs/modules/develop/pages/guide_github_projects.adoc +1 -1
- data/docs/modules/develop/pages/guide_migrate_webpacker_app.adoc +2 -2
- data/docs/modules/develop/pages/guide_migrate_webpacker_module.adoc +1 -1
- data/docs/modules/develop/pages/maintainers/releases.adoc +2 -4
- data/docs/modules/develop/pages/managing_translations_i18n.adoc +2 -2
- data/docs/modules/develop/pages/maps.adoc +5 -5
- data/docs/modules/develop/pages/metrics.adoc +1 -1
- data/docs/modules/develop/pages/modules.adoc +1 -1
- data/docs/modules/develop/pages/newsletter_templates.adoc +2 -2
- data/docs/modules/develop/pages/notifications.adoc +124 -1
- data/docs/modules/develop/pages/reminders.adoc +2 -2
- data/docs/modules/develop/pages/reportable.adoc +1 -1
- data/docs/modules/develop/pages/testing.adoc +2 -2
- data/docs/modules/develop/pages/troubleshooting_metrics.adoc +2 -2
- data/docs/modules/develop/pages/view_models_aka_cells.adoc +1 -1
- data/docs/modules/install/pages/checklist.adoc +3 -2
- data/docs/modules/install/pages/empty-database.adoc +3 -3
- data/docs/modules/install/pages/index.adoc +5 -5
- data/docs/modules/install/pages/manual.adoc +3 -2
- data/docs/modules/install/pages/update.adoc +2 -2
- data/docs/modules/services/pages/activestorage.adoc +1 -1
- data/docs/modules/services/pages/index.adoc +0 -1
- data/docs/modules/services/pages/maps.adoc +2 -2
- data/docs/modules/services/pages/sms.adoc +1 -1
- data/docs/modules/services/pages/social_providers.adoc +3 -3
- data/lib/decidim/gem_manager.rb +2 -0
- data/lib/decidim/version.rb +1 -1
- data/package-lock.json +6359 -19611
- data/package.json +4 -6
- data/packages/browserslist-config/package.json +1 -1
- data/packages/core/package.json +11 -11
- data/packages/dev/package.json +1 -1
- data/packages/eslint-config/index.js +58 -82
- data/packages/eslint-config/package.json +1 -1
- data/packages/prettier-config/package.json +1 -1
- data/packages/stylelint-config/package.json +1 -1
- data/packages/webpacker/index.js +2 -1
- data/packages/webpacker/package.json +5 -11
- metadata +61 -61
- data/babel.config.json +0 -25
- data/docs/modules/develop/pages/consulations_removal.bash +0 -117
- data/docs/modules/services/pages/elections_bulletin_board.adoc +0 -55
- data/lib/decidim/backporter.rb +0 -98
- data/lib/decidim/backports_reporter/cli_report.rb +0 -44
- data/lib/decidim/backports_reporter/csv_report.rb +0 -32
- data/lib/decidim/backports_reporter/report.rb +0 -46
- data/lib/decidim/git_backport_checker.rb +0 -70
- data/lib/decidim/git_backport_manager.rb +0 -179
- data/lib/decidim/github_manager/poster.rb +0 -70
- data/lib/decidim/github_manager/querier/base.rb +0 -78
- data/lib/decidim/github_manager/querier/by_issue_id.rb +0 -46
- data/lib/decidim/github_manager/querier/by_label.rb +0 -95
- data/lib/decidim/github_manager/querier/related_issues.rb +0 -51
- data/lib/decidim/github_manager/querier.rb +0 -20
- data/packages/elections/package.json +0 -17
- data/packages/webpacker/package-lock.json +0 -18045
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebd04f0caaf87134717507a36fcf80b38e264d816d8255b5b5fbb039d86b8700
|
4
|
+
data.tar.gz: 1924c2e4c641993c0f9f7af0cb57b23dfa67beafa3244a832af122b0a57f691b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95d414b2529227f587e08b474f709ba9d8826445bac39ef06d6cf414f8b774c61f3dd2dc9c93284e718885f3f675ad207643525030199e157d563be57200e7b5
|
7
|
+
data.tar.gz: ef978ea37753656c348f4dce34abe3c1049e7c0fb52b997a44c50c7575549e3c1b2a50bb8492dbba6aac8e58d04cfc9ef8a8d56ca4fcfb52cb1c6f548341958d
|
@@ -22,12 +22,12 @@ default: &default
|
|
22
22
|
cache_manifest: false
|
23
23
|
|
24
24
|
# Select loader to use, available options are 'babel' (default), 'swc' or 'esbuild'
|
25
|
-
webpack_loader: '
|
25
|
+
webpack_loader: 'esbuild'
|
26
26
|
|
27
27
|
# Set to true to enable check for matching versions of shakapacker gem and NPM package - will raise an error if there is a mismatch or wildcard versioning is used
|
28
28
|
ensure_consistent_versioning: true
|
29
29
|
|
30
|
-
# Select whether the compiler will use SHA digest ('digest' option) or most
|
30
|
+
# Select whether the compiler will use SHA digest ('digest' option) or most recent modified timestamp ('mtime') to determine freshness
|
31
31
|
compiler_strategy: digest
|
32
32
|
|
33
33
|
# Select whether the compiler will always use a content hash and not just in production
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"strict": true, /* Enable all strict type-checking options. */
|
4
|
+
"removeComments": true, /* Disable emitting comments. */
|
5
|
+
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
|
6
|
+
"module": "commonjs", /* Specify what module code is generated. */
|
7
|
+
"incremental": true, /* Enable incremental compilation */
|
8
|
+
"target": "es6", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
9
|
+
"skipLibCheck": true, /* Skip type checking all .d.ts files. */
|
10
|
+
}
|
11
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/* eslint-disable */
|
2
2
|
const { config } = require("shakapacker");
|
3
3
|
const { InjectManifest } = require("workbox-webpack-plugin");
|
4
|
-
const
|
4
|
+
const { EsbuildPlugin } = require("esbuild-loader");
|
5
5
|
|
6
6
|
module.exports = {
|
7
7
|
module: {
|
@@ -15,8 +15,8 @@ module.exports = {
|
|
15
15
|
},
|
16
16
|
{
|
17
17
|
test: /\.(js|jsx)$/,
|
18
|
-
exclude: /node_modules
|
19
|
-
loader: "
|
18
|
+
exclude: /node_modules\//,
|
19
|
+
loader: "esbuild-loader"
|
20
20
|
},
|
21
21
|
{
|
22
22
|
test: /\.(graphql|gql)$/,
|
@@ -37,14 +37,11 @@ module.exports = {
|
|
37
37
|
}
|
38
38
|
},
|
39
39
|
{
|
40
|
-
test: [
|
41
|
-
/\.md$/,
|
42
|
-
/\.odt$/,
|
43
|
-
],
|
40
|
+
test: [/\.md$/, /\.odt$/],
|
44
41
|
exclude: [/\.(js|mjs|jsx|ts|tsx)$/],
|
45
|
-
type:
|
42
|
+
type: "asset/resource",
|
46
43
|
generator: {
|
47
|
-
filename:
|
44
|
+
filename: "media/documents/[hash][ext][query]"
|
48
45
|
}
|
49
46
|
},
|
50
47
|
// Overwrite webpacker files rule to amend the filename output
|
@@ -68,9 +65,9 @@ module.exports = {
|
|
68
65
|
/\.svg$/
|
69
66
|
],
|
70
67
|
exclude: [/\.(js|mjs|jsx|ts|tsx)$/],
|
71
|
-
type:
|
68
|
+
type: "asset/resource",
|
72
69
|
generator: {
|
73
|
-
filename:
|
70
|
+
filename: "media/images/[name]-[hash][ext][query]"
|
74
71
|
}
|
75
72
|
}
|
76
73
|
]
|
@@ -81,32 +78,13 @@ module.exports = {
|
|
81
78
|
crypto: false
|
82
79
|
}
|
83
80
|
},
|
84
|
-
// https://github.com/rails/webpacker/issues/2932
|
85
|
-
// As Decidim uses multiple packs, we need to enforce a single runtime, to prevent duplication
|
86
81
|
optimization: {
|
87
82
|
minimizer: [
|
88
|
-
new
|
89
|
-
|
90
|
-
|
91
|
-
parse: {
|
92
|
-
// Let terser parse ecma 8 code but always output
|
93
|
-
// ES5 compliant code for older browsers
|
94
|
-
ecma: 8
|
95
|
-
},
|
96
|
-
compress: {
|
97
|
-
ecma: 5,
|
98
|
-
warnings: false,
|
99
|
-
comparisons: false
|
100
|
-
},
|
101
|
-
mangle: { safari10: true },
|
102
|
-
output: {
|
103
|
-
ecma: 5,
|
104
|
-
comments: false,
|
105
|
-
ascii_only: true
|
106
|
-
}
|
107
|
-
}
|
83
|
+
new EsbuildPlugin({
|
84
|
+
target: "es2015",
|
85
|
+
css: true
|
108
86
|
})
|
109
|
-
]
|
87
|
+
]
|
110
88
|
},
|
111
89
|
entry: config.entrypoints,
|
112
90
|
plugins: [
|
@@ -122,4 +100,4 @@ module.exports = {
|
|
122
100
|
swDest: "../sw.js"
|
123
101
|
})
|
124
102
|
]
|
125
|
-
}
|
103
|
+
};
|
data/decidim.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
"homepage_uri" => "https://decidim.org",
|
19
19
|
"source_code_uri" => "https://github.com/decidim/decidim"
|
20
20
|
}
|
21
|
-
s.required_ruby_version = "~> 3.
|
21
|
+
s.required_ruby_version = "~> 3.2.0"
|
22
22
|
|
23
23
|
s.name = "decidim"
|
24
24
|
|
@@ -63,6 +63,7 @@ Gem::Specification.new do |s|
|
|
63
63
|
s.add_dependency "decidim-sortitions", Decidim.version
|
64
64
|
s.add_dependency "decidim-surveys", Decidim.version
|
65
65
|
s.add_dependency "decidim-system", Decidim.version
|
66
|
+
s.add_dependency "decidim-templates", Decidim.version
|
66
67
|
s.add_dependency "decidim-verifications", Decidim.version
|
67
68
|
|
68
69
|
s.add_development_dependency "bundler", "~> 2.2", ">= 2.2.18"
|
data/docs/README.adoc
CHANGED
@@ -15,7 +15,7 @@ Read more about https://asciidoctor.org/docs/asciidoc-vs-markdown/[Markdown vs A
|
|
15
15
|
|
16
16
|
If you want to convert from Markdown to AsciiDoc:
|
17
17
|
|
18
|
-
. online pandoc
|
18
|
+
. online pandoc converter or
|
19
19
|
. using kramdoc:
|
20
20
|
|
21
21
|
[source,bash]
|
@@ -36,7 +36,7 @@ If you want to try changes in this folder and how it'd be shown in https://docs.
|
|
36
36
|
. Build the antora playbook
|
37
37
|
. Open the generated website with your web browser
|
38
38
|
|
39
|
-
For instructions on how to clone the repository, install dependencies, build the antora playbook and open the generated
|
39
|
+
For instructions on how to clone the repository, install dependencies, build the antora playbook and open the generated website, see https://github.com/decidim/documentation[Decidim's documentation repository README file].
|
40
40
|
|
41
41
|
Regarding "3. Change the antora-playbook.yml url key in source", if this is the configuration at antora-playbook.yml:
|
42
42
|
|
data/docs/antora.yml
CHANGED
@@ -263,7 +263,7 @@ Also some more refined configurations:
|
|
263
263
|
|
264
264
|
|
265
265
|
|MAPS_PROVIDER
|
266
|
-
|For a simple geolocation and tile maps service configuration define this value to one of the supported providers, currently `here` for https://HERE.com[HERE Maps] or `osm` for https://www.openstreetmap.org[
|
266
|
+
|For a simple geolocation and tile maps service configuration define this value to one of the supported providers, currently `here` for https://HERE.com[HERE Maps] or `osm` for https://www.openstreetmap.org[OpenStreetMap]. See xref:services:maps.adoc[Maps].
|
267
267
|
|
|
268
268
|
|No
|
269
269
|
|
@@ -353,7 +353,7 @@ Also some more refined configurations:
|
|
353
353
|
|No
|
354
354
|
|
355
355
|
|OMNIAUTH_FACEBOOK_APP_ID
|
356
|
-
|App ID for enabling access through Facebook.com accounts. See xref:services:social_providers.adoc[Social Providers]. Note that defining this variable automatically renders the "
|
356
|
+
|App ID for enabling access through Facebook.com accounts. See xref:services:social_providers.adoc[Social Providers]. Note that defining this variable automatically renders the "log in with" button.
|
357
357
|
|
|
358
358
|
|*Yes*
|
359
359
|
|
@@ -382,76 +382,6 @@ Also some more refined configurations:
|
|
382
382
|
|
|
383
383
|
|*Yes*
|
384
384
|
|
385
|
-
|BULLETIN_BOARD_SERVER
|
386
|
-
|The full URL to identify a https://github.com/decidim/decidim-bulletin-board[Bulletin Board Server]. *It must point to the Graphql API* (ie: https://bulletinboard.example.org/api) See xref:services:elections_bulletin_board.adoc[Elections Bulletin Board].
|
387
|
-
|
|
388
|
-
|No
|
389
|
-
|
390
|
-
|BULLETIN_BOARD_PUBLIC_KEY
|
391
|
-
|The public RSA key used to verify the Bulletin Board Server. See xref:services:elections_bulletin_board.adoc[Elections Bulletin Board].
|
392
|
-
|
|
393
|
-
|No
|
394
|
-
|
395
|
-
|BULLETIN_BOARD_API_KEY
|
396
|
-
|An additional API key to add additional security with the communications with the Elections Bulletin Board Server. See xref:services:elections_bulletin_board.adoc[Elections Bulletin Board].
|
397
|
-
|
|
398
|
-
|No
|
399
|
-
|
400
|
-
|AUTHORITY_NAME
|
401
|
-
|The name of the Authority registered in the Bulletin Board Server corresponding to this Decidim instance. See xref:services:elections_bulletin_board.adoc[Elections Bulletin Board].
|
402
|
-
|
|
403
|
-
|No
|
404
|
-
|
405
|
-
|AUTHORITY_PRIVATE_KEY
|
406
|
-
|The private RSA key of this Decidim instance corresponding to the Authority public key registered in the Bulletin Board Server. See xref:services:elections_bulletin_board.adoc[Elections Bulletin Board].
|
407
|
-
|
|
408
|
-
|No
|
409
|
-
|
410
|
-
|ELECTIONS_SCHEME_NAME
|
411
|
-
|The type of strategy used in the Bulletin Board Server used for encrypting the Election. *Currently only `electionguard` is available for production* See xref:services:elections_bulletin_board.adoc[Elections Bulletin Board].
|
412
|
-
|electionguard
|
413
|
-
|No
|
414
|
-
|
415
|
-
|ELECTIONS_NUMBER_OF_TRUSTEES
|
416
|
-
|Number of trustees for `electionguard` election scheme, minimum number is 2. See xref:services:elections_bulletin_board.adoc[Elections Bulletin Board].
|
417
|
-
|
|
418
|
-
|No
|
419
|
-
|
420
|
-
|ELECTIONS_QUORUM
|
421
|
-
|Number of trustees required to be present in order to decrypt an election in case of the `electionguard` scheme. Minimum is 2, maximum the number of trustees. See xref:services:elections_bulletin_board.adoc[Elections Bulletin Board].
|
422
|
-
|
|
423
|
-
|No
|
424
|
-
|
425
|
-
|ELECTIONS_SETUP_MINIMUM_HOURS_BEFORE_START
|
426
|
-
|Public Setting that defines how many hours should the setup be run before the election starts
|
427
|
-
|3
|
428
|
-
|No
|
429
|
-
|
430
|
-
|ELECTIONS_START_VOTE_MAXIMUM_HOURS_BEFORE_START
|
431
|
-
|Public Setting that defines how many hours the ballot box can be opened before the election starts
|
432
|
-
|6
|
433
|
-
|No
|
434
|
-
|
435
|
-
|ELECTIONS_VOTER_TOKEN_EXPIRATION_MINUTES
|
436
|
-
|How long any time of message sent to the bulletin board will be valid for any kind of processing.
|
437
|
-
|120
|
438
|
-
|No
|
439
|
-
|
440
|
-
|VOTINGS_CHECK_CENSUS_MAX_REQUESTS
|
441
|
-
|Max requests in a time period to check the census. Only applied in production and test.
|
442
|
-
|5
|
443
|
-
|No
|
444
|
-
|
445
|
-
|VOTINGS_THROTTLING_PERIOD
|
446
|
-
|Time window in which the VOTINGS_CHECK_CENSUS_MAX_REQUESTS throttling is applied (in minutes).
|
447
|
-
|1
|
448
|
-
|No
|
449
|
-
|
450
|
-
|VOTINGS_CENSUS_ACCESS_CODES_EXPORT_EXPIRY_TIME
|
451
|
-
|How long the census access codes export file will are available in the server (in days)
|
452
|
-
|2
|
453
|
-
|No
|
454
|
-
|
455
385
|
|VAPID_PUBLIC_KEY
|
456
386
|
|VAPID public key that will be used to sign the Push API requests. It can be generated running the task: `rails decidim:pwa:generate_vapid_keys`
|
457
387
|
|
|
@@ -479,7 +409,7 @@ Also some more refined configurations:
|
|
479
409
|
|DECIDIM_DEFAULT_LOCALE
|
480
410
|
|The default locale to be used as a fallback (note that, in practice, this value must always be defined in the System configuration for each organization anyway).
|
481
411
|
|
482
|
-
*Note that `
|
412
|
+
*Note that `DECIDIM_AVAILABLE_LOCALES` must include this value*
|
483
413
|
|en
|
484
414
|
|*Partially*, Only when creating a new organization
|
485
415
|
|
@@ -526,16 +456,6 @@ take over user accounts.
|
|
526
456
|
|80
|
527
457
|
|No
|
528
458
|
|
529
|
-
|DECIDIM_CACHE_EXPIRATION_TIME
|
530
|
-
|The default number of minutes where a cache in Decidim will be applied (currently Decidim applies cache to some pieces of html called cells). If empty has no expiration time (but you can clear the cache anytime with the command `rails tmp:clear`). Note that zero ("0") is different than an empty string and it will disable the cache completely.
|
531
|
-
|1440
|
532
|
-
|No
|
533
|
-
|
534
|
-
|DECIDIM_STATS_CACHE_EXPIRATION_TIME
|
535
|
-
|Same as before but for the default number of minutes for html that displays stats.
|
536
|
-
|10
|
537
|
-
|No
|
538
|
-
|
539
459
|
|DECIDIM_MAXIMUM_ATTACHMENT_SIZE
|
540
460
|
|The maximum file size of an attachment (in Megabytes).
|
541
461
|
|
@@ -628,7 +548,7 @@ Notice that expire_session_after will not take effect when the user wants to be
|
|
628
548
|
|No
|
629
549
|
|
630
550
|
|DECIDIM_FOLLOW_HTTP_X_FORWARDED_HOST
|
631
|
-
|Exposes a configuration option: `
|
551
|
+
|Exposes a configuration option: `HTTP_X_FORWARDED_HOST` header follow-up.
|
632
552
|
|
633
553
|
If a caching system is in place, it can also allow cache and log poisoning attacks, allowing attackers to control the contents of caches and logs that could be used for other attacks.
|
634
554
|
|false
|
@@ -694,7 +614,7 @@ Additional context: This has been revealed as an issue during a security audit o
|
|
694
614
|
|No
|
695
615
|
|
696
616
|
|*DECIDIM_SERVICE_WORKER_ENABLED*
|
697
|
-
|Enable/Disable the service worker. This is used to enable offline support and to deliver push notifications. In development it is recommended to be disabled because its
|
617
|
+
|Enable/Disable the service worker. This is used to enable offline support and to deliver push notifications. In development it is recommended to be disabled because its aggressive cache configuration might cause some issues when submitting forms.
|
698
618
|
|false
|
699
619
|
|No
|
700
620
|
|
@@ -721,22 +641,6 @@ Additional context: This has been revealed as an issue during a security audit o
|
|
721
641
|
|15
|
722
642
|
|No
|
723
643
|
|
724
|
-
|PROPOSALS_SIMILARITY_THRESHOLD
|
725
|
-
|When users create proposals, there are presented with a list of alternative, similar, proposals already created.
|
726
|
-
Similarity goes from 0 (no similar at all) to 1 (exactly the same content).
|
727
|
-
|
728
|
-
Lower this number to require less coincidences between the texts to create the alternative list.
|
729
|
-
Increase this number to force the alternative proposal be very similar in order to be considered an alternative.
|
730
|
-
|
731
|
-
Using a very high number (ie: 0.99) can effectively deactivate the comparison step when creating proposals.
|
732
|
-
|0.25
|
733
|
-
|No
|
734
|
-
|
735
|
-
|PROPOSALS_SIMILARITY_LIMIT
|
736
|
-
|Max number of proposals from the alternative, similar, proposals to be presented to the user.
|
737
|
-
|10
|
738
|
-
|No
|
739
|
-
|
740
644
|
|PROPOSALS_PARTICIPATORY_SPACE_HIGHLIGHTED_PROPOSALS_LIMIT
|
741
645
|
|Number of proposals to be shown in blocks with highlighted content across different participatory spaces.
|
742
646
|
|4
|
@@ -870,7 +774,7 @@ Note that this only applies to production environments.
|
|
870
774
|
|No
|
871
775
|
|
872
776
|
|RAILS_ASSET_HOST
|
873
|
-
|If you use a CDN or another type of assets management, you can specify the host (and path) for it so, instead of Rails serving your assets (CSS,
|
777
|
+
|If you use a CDN or another type of assets management, you can specify the host (and path) for it so, instead of Rails serving your assets (CSS, JavaScript, Images) will use your custom system. For instance `https://assets.example.org`
|
874
778
|
|
|
875
779
|
|No
|
876
780
|
|
@@ -33,7 +33,7 @@ For instance, if you are planing to use some external cloud storage service (suc
|
|
33
33
|
decidim --storage s3 my_decidim_application
|
34
34
|
----
|
35
35
|
|
36
|
-
It is also recommended to use a proper Job Queue processor such as `sidekiq` or `delayed_job`. The `--queue` modifier allows you to generate a Decidim Application with a proper Sidekiq configuration (DelayedJob is not supported yet, PR
|
36
|
+
It is also recommended to use a proper Job Queue processor such as `sidekiq` or `delayed_job`. The `--queue` modifier allows you to generate a Decidim Application with a proper Sidekiq configuration (DelayedJob is not supported yet, PR welcomed, but you can easily just follow the https://github.com/collectiveidea/delayed_job[official instructions]):
|
37
37
|
|
38
38
|
[source,console]
|
39
39
|
----
|
@@ -447,7 +447,7 @@ Defines additional content security policies following the structure keys are th
|
|
447
447
|
List of additional content security policies to be appended to the default ones
|
448
448
|
This is useful for adding custom CSPs for external services like Here Maps, YouTube, X (former Twitter) etc.
|
449
449
|
|
450
|
-
Below you will find a the
|
450
|
+
Below you will find a the recipe of enabling X (former Twitter) timelines, based on https://content-security-policy.com/examples/twitter/[Content Security Policy (CSP) Examples Twitter example].
|
451
451
|
The format is a Hash with the following structure:
|
452
452
|
[source,ruby]
|
453
453
|
....
|
@@ -0,0 +1,32 @@
|
|
1
|
+
= Admin filters
|
2
|
+
|
3
|
+
Filters in admin panels are defined with a common Filterable concern and each one defines a series of methods defining the different available filters, the options for each one, etc.
|
4
|
+
|
5
|
+
Decidim provides an Api to manage and add custom elements to each admin filter defined in the application. Each defined filter can be accessed by a unique symbol and provides the methods `add_filters` and `add_dynamically_translated_filters` which allows us to add new items to the respective `filters` and `dynamically_translated` arrays provided by the filter registry and `add_filters_with_values` which allows us to merge new items into the `filters_with_values` hash also provided by the registry.
|
6
|
+
|
7
|
+
Note that those methods are called at filter rendering time, so all methods provided by the controller and the concern filterable are available to evaluate when defining new elements
|
8
|
+
|
9
|
+
For example, to add new filter to proposals index:
|
10
|
+
|
11
|
+
[source,ruby]
|
12
|
+
....
|
13
|
+
Decidim.admin_filter(:proposals) do |filter|
|
14
|
+
# An example of how to access to the context. In this case the custom
|
15
|
+
# filter is only enabled for valuators of the space
|
16
|
+
if current_participatory_space.user_roles(:valuator).where(user: current_user).exists?
|
17
|
+
filter.add_filters(:custom_new_filter)
|
18
|
+
filter.add_filters_with_values(custom_new_filter: %w(custom_new_value_1 custom_new_value_2))
|
19
|
+
end
|
20
|
+
end
|
21
|
+
....
|
22
|
+
|
23
|
+
The filter registry definition block is called from the proposals filterable concern in this way:
|
24
|
+
|
25
|
+
[source,ruby]
|
26
|
+
....
|
27
|
+
delegate :filters, :dynamically_translated_filters, :filters_with_values, to: :filter_config
|
28
|
+
|
29
|
+
def filter_config
|
30
|
+
@filter_config ||= Decidim::AdminFilter.new(:proposals).build_for(self)
|
31
|
+
end
|
32
|
+
....
|
@@ -26,7 +26,7 @@ NOTE: Script type should be "text/plain". Without that, user's data consent sett
|
|
26
26
|
|
27
27
|
== Adding data consent category and related documentation
|
28
28
|
|
29
|
-
You are able to modify data consent categories via the `
|
29
|
+
You are able to modify data consent categories via the `consent_categories` configuration option.
|
30
30
|
|
31
31
|
For example if you want to add a "statistics" category you need to add following code to your app's initializer:
|
32
32
|
|
@@ -20,9 +20,10 @@ Inside of your application you can customize it in different ways:
|
|
20
20
|
* xref:customize:data_consent.adoc[Data consent]
|
21
21
|
* xref:customize:gemfile.adoc[Gemfile]
|
22
22
|
* xref:customize:images.adoc[Images]
|
23
|
-
* xref:customize:javascript.adoc[
|
23
|
+
* xref:customize:javascript.adoc[JavaScript]
|
24
24
|
* xref:customize:logic.adoc[Logic]
|
25
25
|
* xref:customize:menu.adoc[Menu]
|
26
|
+
* xref:customize:admin_filters.adoc[Admin filters]
|
26
27
|
* xref:customize:oauth.adoc[OAuth]
|
27
28
|
* xref:customize:styles.adoc[Styles]
|
28
29
|
* xref:customize:texts.adoc[Texts]
|
@@ -4,7 +4,7 @@ There are occasions you find yourself in a situation that you need to change Dec
|
|
4
4
|
As an example, we will add a new validation rule to the Admin panel, where Admin cannot add projects with budgets more than half the total budget. Once we applied such limitation, admins should not be able to add a project with the cost of 5,001 euros to a budget with total of 10,000 euros.
|
5
5
|
|
6
6
|
[#maximum-budget-rule]
|
7
|
-
.Trying to create a project with the budget of €5,001 for a budget with the total amount of €10,000(My budget)
|
7
|
+
.Trying to create a project with the budget of €5,001 for a budget with the total amount of €10,000(My budget) results in error(bottom-right error message)
|
8
8
|
|
9
9
|
image::maximum_budget.png[Maximum budget error]
|
10
10
|
|
@@ -28,7 +28,7 @@ The format of this variable is as follows
|
|
28
28
|
DECIDIM_SOCIAL_SHARE_SERVICES="Facebook, X"
|
29
29
|
----
|
30
30
|
|
31
|
-
NOTE: Services names are case
|
31
|
+
NOTE: Services names are case-sensitive.
|
32
32
|
|
33
33
|
== Default services
|
34
34
|
|
@@ -38,7 +38,7 @@ image::social-share-modal-default.png[Social share modal]
|
|
38
38
|
|
39
39
|
== Custom services
|
40
40
|
|
41
|
-
If you have the need, you can enable your own service. To do that, as an example for a
|
41
|
+
If you have the need, you can enable your own service. To do that, as an example for a fictitious social service called "Foo", you will need to follow these steps:
|
42
42
|
|
43
43
|
. Add the logo of your service to the images' pack at `app/packs/images/`. Following the example, it'd be "foo.svg"
|
44
44
|
|
@@ -8,7 +8,7 @@ If you only want to change colors and anything more, the most easy and fast way
|
|
8
8
|
|
9
9
|
image::organization-colors.png[Organization colors]
|
10
10
|
|
11
|
-
This works for any Organization inside of a
|
11
|
+
This works for any Organization inside of a Multitenant.
|
12
12
|
|
13
13
|
== Head extra file
|
14
14
|
|
@@ -62,7 +62,7 @@ We use http://sass-lang.com/guide[SASS, with SCSS syntax] as CSS preprocessor.
|
|
62
62
|
|
63
63
|
== Tailwind CSS
|
64
64
|
|
65
|
-
Decidim uses
|
65
|
+
Decidim uses Tailwind CSS as a CSS framework, which has a default configuration that is being handled by `tailwind.config.js` in the root of your project.
|
66
66
|
|
67
67
|
Since this file is being managed by Decidim, it will be impossible to customize it.
|
68
68
|
|
@@ -81,6 +81,6 @@ If you want to override other layouts, you can do so by creating new files:
|
|
81
81
|
|
82
82
|
== Accessibility
|
83
83
|
|
84
|
-
To maintain
|
84
|
+
To maintain accessibility level, if you add new colors use a http://webaim.org/resources/contrastchecker/[Color contrast checker] (WCAG AA is mandatory, WCAG AAA is recommended)
|
85
85
|
|
86
86
|
For more information about accessibility, see the xref:develop:guide_accessibility.adoc[accessibility guide].
|
@@ -17,7 +17,7 @@ As an example, if I want to change the footer, you'd need to search for the file
|
|
17
17
|
|
18
18
|
== Deface method
|
19
19
|
|
20
|
-
You will need the https://github.com/spree/deface[`deface` gem] installed on your application, and follow their instructions on how to use the different
|
20
|
+
You will need the https://github.com/spree/deface[`deface` gem] installed on your application, and follow their instructions on how to use the different overriding methods that they support.
|
21
21
|
|
22
22
|
As an example, if you want to change the footer, you can do so by creating the file `app/overrides/layouts/decidim/_main_footer/pre_footer.html.erb.deface` with these contents:
|
23
23
|
|
@@ -1,14 +1,14 @@
|
|
1
1
|
= Authorship
|
2
2
|
|
3
|
-
|
3
|
+
Regarding authorship of Decidim resources/entities, there are three concerns
|
4
4
|
involved directly:
|
5
5
|
|
6
6
|
* `Decidim::ActsAsAuthor`: which defines how an author should behave.
|
7
7
|
* `Decidim::Authorable` and `Decidim::Coauthorable`: which define the behaviour around who authored a resource.
|
8
8
|
|
9
9
|
But the presenters for the classes including `ActsAsAuthor` should also behave
|
10
|
-
in a certain
|
11
|
-
(remember, if it
|
10
|
+
in a certain manner. This has been resolved using the duck typing strategy
|
11
|
+
(remember, if it quacks as as duck, then it is a duck). Thus, there is not any
|
12
12
|
interface declaring which are the methods to be implemented by the presenter
|
13
13
|
of an author. Anyway one of the ``OfficialAuthorPresenter``s may be used as a
|
14
14
|
reference.
|
@@ -11,23 +11,24 @@ The process for making backports is the following:
|
|
11
11
|
. Check in the git commit history what was the latest backports on the branch that you are working with. https://github.com/decidim/decidim/commits/release/0.27-stable[Example for v0.27]. Copy the number of the last PR backported.
|
12
12
|
. Search in GitHub for the this PR in the list of merged PRs of the `type: fix`. https://github.com/decidim/decidim/pulls?page=1&q=is%3Apr+sort%3Aupdated-desc+label%3A%22type%3A+fix%22+is%3Amerged[Example URL].
|
13
13
|
. Check the PRs merged just before and after this one. You need to find the last ones that were not backported already to start with the backport process. A fast way for checking this out is to open the PRs and see the mentions from the backports in the GitHub references.
|
14
|
-
. Once you have the list of the PRs that you want to backport, you can start with the process by using the https://github.com/decidim/decidim
|
14
|
+
. Once you have the list of the PRs that you want to backport, you can start with the process by using the https://github.com/decidim/decidim-maintainers_toolbox[decidim-backporter script]. This script mostly handles the branch creation, cherrypicking, labeling and pushing of the fix. For using it you will need to have a GitHub Personal Access Token.
|
15
15
|
|
16
16
|
This is an example on how this command is called:
|
17
17
|
|
18
18
|
```shell
|
19
|
-
$
|
19
|
+
$ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
|
20
|
+
$ decidim-backporter --github-token=GITHUB_TOKEN --pull-request-id=10248 --version-number=0.27
|
20
21
|
```
|
21
22
|
|
22
23
|
And this is the current full documentation for this script:
|
23
24
|
|
24
25
|
```shell
|
25
|
-
$
|
26
|
+
$ decidim-backporter --help
|
26
27
|
Usage:
|
27
|
-
backporter --github-token=GITHUB_TOKEN --pull-request-id=PULL_REQUEST_ID --version-number=VERSION_NUMBER
|
28
|
+
decidim-backporter --github-token=GITHUB_TOKEN --pull-request-id=PULL_REQUEST_ID --version-number=VERSION_NUMBER
|
28
29
|
|
29
30
|
Options:
|
30
|
-
--github-token=GITHUB_TOKEN # Required.
|
31
|
+
--github-token=GITHUB_TOKEN # Required. GitHub Personal Access Token (PAT). It can be obtained from https://github.com/settings/tokens/new. You will need to create one with `public_repo` access.
|
31
32
|
--version-number=VERSION_NUMBER # Required. The version number that you want to do the backport to. It must have the format MAJOR.MINOR.
|
32
33
|
--pull-request-id=PULL_REQUEST_ID # Required. The ID of the pull request that you want to make the backport from. It should have the "type: fix" label.
|
33
34
|
[--exit-with-unstaged-changes], [--no-exit-with-unstaged-changes] # Optional. Whether the script should exit with an error if there are unstaged changes in the current project.
|
@@ -11,7 +11,7 @@ title System Component diagram for Decidim Applications (https://decidim.org)
|
|
11
11
|
|
12
12
|
ContainerDb(rel_db, "Relational Database", "PostgreSQL 9.5.x", "Stores users, participatory processes, assemblies, initiatives, proposals, meetings, etc.")
|
13
13
|
Container(filesystem, "File System", "Local or remote", "Stores uploads (images, documents, etc.)")
|
14
|
-
Container(worker, "Worker", "Ruby on Rails 5.2", "ActiveJob queues for non
|
14
|
+
Container(worker, "Worker", "Ruby on Rails 5.2", "ActiveJob queues for non synchronous jobs. Works for open data requests, sending emails, etc.")
|
15
15
|
|
16
16
|
Container_Boundary(web_app, "Web Application") {
|
17
17
|
|
@@ -25,7 +25,7 @@ Container_Boundary(web_app, "Web Application") {
|
|
25
25
|
Component(system, "System module", "Ruby On Rails Engine", "Multitenant configuration, mounted in /system. Can create and manage all the instances of an installation.")
|
26
26
|
Component(verifications, "Verifications module", "Ruby On Rails Engine", " Offers several methods for allowing participants to get authorization to perform certain privileged actions.")
|
27
27
|
|
28
|
-
Component(assemblies, "Assemblies module", "Ruby On Rails Engine (Space)", "A
|
28
|
+
Component(assemblies, "Assemblies module", "Ruby On Rails Engine (Space)", "A permanent Space, mounted in /assemblies.")
|
29
29
|
Component(conferences, "Conferences module", "Ruby On Rails Engine (Space)", "A temporal Space, mounted in /conferences.")
|
30
30
|
Component(initiatives, "Initiatives module", "Ruby On Rails Engine (Space)", "A bottom-up Space, mounted in /initiatives. A participant can collect signatures to bring an issue to the organization.")
|
31
31
|
Component(participatory_processes, "Participatory Processes module (Space)", "Ruby On Rails Engine", "A temporal Space, mounted in /processes.")
|
@@ -34,7 +34,6 @@ Container_Boundary(web_app, "Web Application") {
|
|
34
34
|
Component(budgets, "Budgets module", "Ruby On Rails Engine", "Component. Adds a participatory budgets system to any participatory space.")
|
35
35
|
Component(blogs, "Blogs module", "Ruby On Rails Engine", "Component. Makes possible to add posts ordered by publication time to spaces.")
|
36
36
|
Component(debates, "Debates module", "Ruby On Rails Engine", "Component. Adds a CRUD engine to the admin and public view scoped inside the participatory process.")
|
37
|
-
Component(elections, "Elections module", "Ruby On Rails Engine", "Components. Adds voting with cryptographic capabilities.")
|
38
37
|
Component(meetings, "Meetings module", "Ruby On Rails Engine", "Component. Adds a CRUD engine to the admin and public view scoped inside the participatory process.")
|
39
38
|
Component(pages, "Pages module", "Ruby On Rails Engine", "Component. adds static page capabilities to any participatory space. It basically provides an interface to include arbitrary HTML content to any step.")
|
40
39
|
Component(proposals, "Proposals module", "Ruby On Rails Engine", "Component. Adds one of the main components of Decidim: allows users to contribute to a participatory space by creating proposals.")
|
@@ -43,7 +42,6 @@ Container_Boundary(web_app, "Web Application") {
|
|
43
42
|
|
44
43
|
Rel(surveys, forms, "Consumes")
|
45
44
|
Rel(meetings, forms, "Consumes")
|
46
|
-
Rel_Back(forms, elections, "Consumes")
|
47
45
|
|
48
46
|
' Rel(proposals, assemblies, "Mounts in")
|
49
47
|
' Rel(proposals, participatory_processes, "Mounts in")
|
@@ -67,17 +65,14 @@ Container_Boundary(web_app, "Web Application") {
|
|
67
65
|
' Rel(debates, admin, "Managed in")
|
68
66
|
' Rel(proposals, admin, "Managed in")
|
69
67
|
' Rel(blogs, admin, "Managed in")
|
70
|
-
' Rel(elections, admin, "Managed in")
|
71
68
|
|
72
69
|
}
|
73
70
|
|
74
|
-
System_Ext(decidim_bulletin_board_system, "Decidim Bulletin Board", "Allows participants to cast end-to-end verifiable secret votes.")
|
75
71
|
System_Ext(mail_system, "SMTP system (e-mail)", "Sends mails to users, like confirmations, reminders, notifications, etc.")
|
76
72
|
System_Ext(etherpad_system, "Etherpad-Lite system", "Optional. Allows real-time text edition in Meetings.")
|
77
73
|
System_Ext(geocoding_system, "Geocoding system", "Optional. An Open Street Maps provider, allows geographical localization of Proposals and Meetings..")
|
78
74
|
System_Ext(oauth_system, "OAUTH2 System", "Optional. Third party sign on systems. Could be Twitter, Facebook, Google or any other OAUTH2 providers.")
|
79
75
|
|
80
|
-
Rel_Back_Neighbor(decidim_bulletin_board_system, elections, "Uses")
|
81
76
|
Rel_Neighbor(worker, mail_system, "Sends e-mails", "SMTP")
|
82
77
|
Rel(web_app, rel_db, "Uses")
|
83
78
|
Rel(web_app, filesystem, "Uses")
|
@@ -17,10 +17,9 @@ System_Boundary(decidim_system, "decidim"){
|
|
17
17
|
Container(web_app, "Web Application", "Ruby on Rails 5.2", "Allows participants to make decisions collaboratively through participatory processes, assemblies, initiatives, etc.")
|
18
18
|
ContainerDb(rel_db, "Relational Database", "PostgreSQL 9.5.x", "Stores users, participatory processes, assemblies, initiatives, proposals, meetings, etc.")
|
19
19
|
Container(filesystem, "File System", "Local or remote", "Stores uploads (images, documents, etc.)")
|
20
|
-
Container(worker, "Worker", "Ruby on Rails 5.2", "ActiveJob queues for non
|
20
|
+
Container(worker, "Worker", "Ruby on Rails 5.2", "ActiveJob queues for non synchronous jobs. Works for open data requests, sending emails, etc.")
|
21
21
|
}
|
22
22
|
|
23
|
-
System_Ext(decidim_bulletin_board_system, "Decidim Bulletin Board", "Allows participants to cast end-to-end verifiable secret votes.")
|
24
23
|
System_Ext(mail_system, "SMTP system (e-mail)", "Sends mails to users, like confirmations, reminders, notifications, etc.")
|
25
24
|
System_Ext(etherpad_system, "Etherpad-Lite system", "Optional. Allows real-time text edition in Meetings.")
|
26
25
|
System_Ext(geocoding_system, "Geocoding system", "Optional. An Open Street Maps provider, allows geographical localization of Proposals and Meetings..")
|
@@ -31,7 +30,6 @@ Rel(participant_user, web_app, "Uses")
|
|
31
30
|
Rel(administration_user, web_app, "Uses")
|
32
31
|
Rel_Back(participant_user, mail_system, "Sends e-mails to")
|
33
32
|
Rel_Back(administration_user, mail_system, "Sends e-mails to")
|
34
|
-
Rel_Back_Neighbor(decidim_bulletin_board_system, web_app, "Uses")
|
35
33
|
Rel_Neighbor(worker, mail_system, "Sends e-mails", "SMTP")
|
36
34
|
Rel(web_app, rel_db, "Uses")
|
37
35
|
Rel(web_app, filesystem, "Uses")
|