decidim 0.30.2 → 0.31.0.rc1
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/decidim-core/lib/decidim/{webpacker → shakapacker}/configuration.rb +4 -4
- data/decidim-core/lib/decidim/{webpacker → shakapacker}/runner.rb +3 -3
- data/decidim-core/lib/decidim/shakapacker/shakapacker.rb +8 -0
- data/decidim-core/lib/decidim/{webpacker → shakapacker}/shakapacker.yml +3 -1
- data/decidim-core/lib/decidim/{webpacker → shakapacker}/webpack/custom.js +1 -1
- data/decidim.gemspec +1 -1
- data/docs/antora.yml +1 -1
- data/docs/modules/configure/pages/environment_variables.adoc +184 -35
- data/docs/modules/configure/pages/index.adoc +2 -3
- data/docs/modules/configure/pages/initializer.adoc +45 -31
- data/docs/modules/configure/pages/system.adoc +3 -3
- data/docs/modules/customize/assets/images/social-share-modal-default.png +0 -0
- data/docs/modules/customize/pages/admin_filters.adoc +2 -2
- data/docs/modules/customize/pages/content_security_policy.adoc +1 -1
- data/docs/modules/customize/pages/images.adoc +1 -1
- data/docs/modules/customize/pages/index.adoc +1 -0
- data/docs/modules/customize/pages/javascript.adoc +5 -18
- data/docs/modules/customize/pages/localization.adoc +75 -0
- data/docs/modules/customize/pages/oauth.adoc +12 -0
- data/docs/modules/customize/pages/social_shares.adoc +0 -3
- data/docs/modules/customize/pages/styles.adoc +3 -16
- data/docs/modules/develop/assets/attachments/grafana/metadecidim-csv.json +1106 -0
- data/docs/modules/develop/assets/attachments/grafana/metadecidim-graphql.json +632 -0
- data/docs/modules/develop/assets/images/grafana/create_account_confirm.png +0 -0
- data/docs/modules/develop/assets/images/grafana/create_account_form.png +0 -0
- data/docs/modules/develop/assets/images/grafana/create_account_setup.png +0 -0
- data/docs/modules/develop/assets/images/grafana/dashboard_example_csv.png +0 -0
- data/docs/modules/develop/assets/images/grafana/dashboard_example_graphql.png +0 -0
- data/docs/modules/develop/assets/images/grafana/dashboard_import.png +0 -0
- data/docs/modules/develop/assets/images/grafana/dashboard_import_csv.png +0 -0
- data/docs/modules/develop/assets/images/grafana/dashboards.png +0 -0
- data/docs/modules/develop/assets/images/grafana/homepage.png +0 -0
- data/docs/modules/develop/pages/api.adoc +12 -2
- data/docs/modules/develop/pages/classes/models.adoc +2 -2
- data/docs/modules/develop/pages/commentable.adoc +9 -11
- data/docs/modules/develop/pages/components.adoc +10 -10
- data/docs/modules/develop/pages/elections.adoc +101 -0
- data/docs/modules/develop/pages/fixing_locales.adoc +7 -12
- data/docs/modules/develop/pages/grafana.adoc +100 -0
- data/docs/modules/develop/pages/likeable.adoc +106 -0
- data/docs/modules/develop/pages/machine_translations.adoc +6 -2
- data/docs/modules/develop/pages/maintainers/releases.adoc +40 -202
- data/docs/modules/develop/pages/maps.adoc +8 -8
- data/docs/modules/develop/pages/modules.adoc +1 -1
- data/docs/modules/develop/pages/notifications.adoc +27 -56
- data/docs/modules/develop/pages/permissions.adoc +19 -19
- data/docs/modules/develop/pages/taxonomies.adoc +1 -15
- data/docs/modules/install/pages/checklist.adoc +2 -1
- data/docs/modules/install/pages/index.adoc +3 -3
- data/docs/modules/install/pages/manual.adoc +5 -5
- data/docs/modules/install/partials/version_matrix.adoc +4 -2
- data/docs/modules/services/pages/aitools.adoc +0 -2
- data/docs/modules/services/pages/etherpad.adoc +5 -20
- data/docs/modules/services/pages/machine_translation.adoc +38 -0
- data/docs/modules/services/pages/maps.adoc +8 -66
- data/docs/modules/services/pages/pdf.adoc +33 -0
- data/docs/modules/services/pages/sms.adoc +6 -7
- data/docs/modules/services/pages/social_providers.adoc +1 -1
- data/docs/modules/services/pages/timestamp.adoc +47 -0
- data/lib/decidim/version.rb +1 -1
- data/package-lock.json +2413 -2624
- data/package.json +3 -2
- data/packages/browserslist-config/package.json +1 -1
- data/packages/core/package.json +2 -3
- data/packages/dev/package.json +2 -2
- 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/package.json +3 -2
- data/packages/webpacker/src/loaders/decidim-sass-loader.js +18 -11
- metadata +68 -54
- data/docs/modules/develop/pages/endorsable.adoc +0 -110
- data/docs/modules/develop/pages/guide_migrate_webpacker_app.adoc +0 -257
- data/docs/modules/develop/pages/guide_migrate_webpacker_module.adoc +0 -132
- data/docs/modules/develop/pages/metrics.adoc +0 -123
- data/docs/modules/develop/pages/troubleshooting_metrics.adoc +0 -255
- /data/decidim-core/lib/decidim/{webpacker → shakapacker}/esbuild.config.js +0 -0
- /data/decidim-core/lib/decidim/{webpacker → shakapacker}/postcss.config.js +0 -0
- /data/decidim-core/lib/decidim/{webpacker → shakapacker}/tsconfig.json +0 -0
- /data/decidim-core/lib/decidim/{webpacker → shakapacker}/webpack/.modernizrrc +0 -0
- /data/decidim-core/lib/decidim/{webpacker → shakapacker}/webpack/webpack.config.js +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e626a38640359192d2b88c81f738aaf4ec02b5361084ef3bf431ae74f784f317
|
4
|
+
data.tar.gz: 8fc55132e141625a45ca5dd645d6e9e8898aaf04e72e91cc473a9c03e98e6d9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b94c2f85ba2246ace8097fe3c8fb7b3fbde7561778b8777e531d4a74e8318b3e2f3a17d4f299aebc48faa66ed1451347ce5d73732f9d10f99302a3e94e54bc1
|
7
|
+
data.tar.gz: 59ff6b0ec857c76df2039e9eceda04af5c3718b7b1b76b702b97915e4ec6856a5e2367864e6eb294aa14cb280ec0e9937bd86cffd875da8f8479a644e48dea98
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Decidim
|
4
|
-
module
|
4
|
+
module Shakapacker
|
5
5
|
class Configuration
|
6
6
|
attr_reader :additional_paths, :entrypoints, :stylesheet_imports
|
7
7
|
|
@@ -12,7 +12,7 @@ module Decidim
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def configuration_file
|
15
|
-
# Before
|
15
|
+
# Before shakapacker is installed, the original configuration file may not
|
16
16
|
# be available yet.
|
17
17
|
return unless File.exist?(original_configuration_file_path)
|
18
18
|
return configuration_file_path if configurations_loaded?
|
@@ -58,13 +58,13 @@ module Decidim
|
|
58
58
|
if defined?(Rails)
|
59
59
|
Rails.application.root
|
60
60
|
else
|
61
|
-
# This is used when Rails is not available from the
|
61
|
+
# This is used when Rails is not available from the shakapacker binstubs
|
62
62
|
File.expand_path(".", Dir.pwd)
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
66
|
def configuration_file_path
|
67
|
-
@configuration_file_path ||= File.join(app_path, "tmp/
|
67
|
+
@configuration_file_path ||= File.join(app_path, "tmp/shakapacker_runtime.yml")
|
68
68
|
end
|
69
69
|
|
70
70
|
def original_configuration_file_path
|
@@ -1,15 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Decidim
|
4
|
-
module
|
4
|
+
module Shakapacker
|
5
5
|
module Runner
|
6
6
|
def self.included(base)
|
7
7
|
base.alias_method :original_initialize, :initialize
|
8
8
|
base.send :private, :original_initialize
|
9
9
|
|
10
10
|
base.define_method :initialize do |argv|
|
11
|
-
original_initialize(argv)
|
12
11
|
decidim_initialize(argv)
|
12
|
+
original_initialize(argv)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
@@ -22,7 +22,7 @@ module Decidim
|
|
22
22
|
Decidim::Assets::Tailwind.write_runtime_configuration
|
23
23
|
|
24
24
|
# Write the runtime configuration and override the configuration
|
25
|
-
|
25
|
+
ENV["SHAKAPACKER_CONFIG"] = Decidim::Shakapacker.configuration.configuration_file
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# File written by Decidim generator
|
2
|
-
# Note: You must restart bin/
|
2
|
+
# Note: You must restart bin/shakapacker-dev-server for changes to take effect
|
3
3
|
|
4
4
|
default: &default
|
5
5
|
source_path: app/packs
|
@@ -62,6 +62,8 @@ development:
|
|
62
62
|
# port: 8080
|
63
63
|
# Should we use gzip compression?
|
64
64
|
compress: true
|
65
|
+
# Disable live reloading for faster development experience
|
66
|
+
live_reload: false
|
65
67
|
# Note that apps that do not check the host are vulnerable to DNS rebinding attacks
|
66
68
|
allowed_hosts: "all"
|
67
69
|
pretty: true
|
@@ -44,7 +44,7 @@ module.exports = {
|
|
44
44
|
filename: "media/documents/[hash][ext][query]"
|
45
45
|
}
|
46
46
|
},
|
47
|
-
// Overwrite
|
47
|
+
// Overwrite shakapacker files rule to amend the filename output
|
48
48
|
// and include the name of the file, otherwise some SVGs
|
49
49
|
// are not generated because the hash is the same between them
|
50
50
|
{
|
data/decidim.gemspec
CHANGED
data/docs/antora.yml
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
We try to let most of the things defined through Environment Variables, as https://12factor.net/config[12factor applications's config]. You will need to configure through your hosting provider (for example in Heroku), through a gem like `figaro` or through docker-compose `env_file`.
|
4
4
|
|
5
|
-
This is an extensive list of all the Env variables supported for an application created with the default `decidim` generator (ie: `decidim my-application`). Custom applications may
|
5
|
+
This is an extensive list of all the Env variables supported for an application created with the default `decidim` generator (ie: `decidim my-application`). Custom applications may implement a decidim initializer (`config/initializers/decidim.rb`) in such a way that this will have no effect.
|
6
6
|
|
7
|
-
Finally, take into account that there are some config variables not available
|
7
|
+
Finally, take into account that there are some config variables not available to Environment. This is because it is not enough to set them in order to make that particular feature to work, it requires the user to add some custom code (like a local generator). For more information about these extra services check the xref:configure:initializer.adoc[Initializer documentation].
|
8
8
|
|
9
9
|
The next tables show all the default Env Vars available when running a default Decidim application (note that customized Decidim apps might differ). The ones marked in *bold* are the minimal required to run a production server. The ones marked as _italic_ are only required for development.
|
10
10
|
|
@@ -425,6 +425,12 @@ Also some more refined configurations:
|
|
425
425
|
|auto
|
426
426
|
|No
|
427
427
|
|
428
|
+
| DECIDIM_PAGE_BLOCKS
|
429
|
+
| Sets the list of static pages' slugs that can include content blocks.
|
430
|
+
By default is only enabled in the terms-of-service static page to allow a summary to be added and include sections with a two-pane view
|
431
|
+
| terms-of-service
|
432
|
+
| no
|
433
|
+
|
428
434
|
|DECIDIM_ENABLE_HTML_HEADER_SNIPPETS
|
429
435
|
|Set to `true` in order to allow administrators to define an arbitrary custom HTML code in the `<head></head>` section any Decidim page.
|
430
436
|
|
@@ -518,6 +524,11 @@ You may specify multiple ip in an array, separating by commas, such as `1.2.3.4,
|
|
518
524
|
|
|
519
525
|
|No
|
520
526
|
|
527
|
+
|DECIDIM_SYSTEM_API_USERS_SECRET_LENGTH
|
528
|
+
|The length of API secrets generated for API users.
|
529
|
+
|32
|
530
|
+
|No
|
531
|
+
|
521
532
|
|DECIDIM_BASE_UPLOADS_PATH
|
522
533
|
|A base path for the uploads. If set, make sure it ends in a slash.
|
523
534
|
Uploads will be set to `<base_path>/uploads/`. This can be useful if you
|
@@ -603,6 +614,15 @@ Additional context: This has been revealed as an issue during a security audit o
|
|
603
614
|
|false
|
604
615
|
|No
|
605
616
|
|
617
|
+
|DECIDIM_CONTENT_PROCESSORS
|
618
|
+
|Exposes a configuration option: an array of symbols representing processors that will be automatically executed when a content is parsed or rendered.
|
619
|
+
|
620
|
+
A content processor is a concept to refer to a set of two classes:
|
621
|
+
- the content parser class
|
622
|
+
- the content renderer class.
|
623
|
+
| ""
|
624
|
+
| No
|
625
|
+
|
606
626
|
|DECIDIM_ADMIN_PASSWORD_STRONG
|
607
627
|
|Enable strong password rules for admin users.
|
608
628
|
|true
|
@@ -623,6 +643,26 @@ Additional context: This has been revealed as an issue during a security audit o
|
|
623
643
|
|15
|
624
644
|
|No
|
625
645
|
|
646
|
+
| DECIDIM_DELETE_INACTIVE_USERS_AFTER_DAYS
|
647
|
+
| Defines after how many days inactive users should be deleted.
|
648
|
+
| 365
|
649
|
+
| No
|
650
|
+
|
651
|
+
| DECIDIM_MINIMUM_INACTIVITY_PERIOD_IN_DAYS
|
652
|
+
| Minimum allowed inactivity period before a user can be considered inactive.
|
653
|
+
| 30
|
654
|
+
| No
|
655
|
+
|
656
|
+
| DECIDIM_DELETE_INACTIVE_USERS_FIRST_WARNING_DAYS_BEFORE
|
657
|
+
| Number of days before deletion when the first warning notification is sent.
|
658
|
+
| 30
|
659
|
+
| No
|
660
|
+
|
661
|
+
| DECIDIM_DELETE_INACTIVE_USERS_LAST_WARNING_DAYS_BEFORE
|
662
|
+
| Number of days before deletion when the last warning notification is sent.
|
663
|
+
| 7
|
664
|
+
| No
|
665
|
+
|
626
666
|
|*DECIDIM_SERVICE_WORKER_ENABLED*
|
627
667
|
|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.
|
628
668
|
|false
|
@@ -633,26 +673,57 @@ Additional context: This has been revealed as an issue during a security audit o
|
|
633
673
|
|true
|
634
674
|
|No
|
635
675
|
|
636
|
-
|*
|
637
|
-
|
|
638
|
-
|
676
|
+
|*DECIDIM_ENABLE_MACHINE_TRANSLATION*
|
677
|
+
| Whether the Decidim attempt to automatically translate missing translations.
|
678
|
+
Read more about this at xref:services:machine_translation.adoc[Machine Translation] service page.
|
679
|
+
| false
|
639
680
|
| No
|
640
681
|
|
641
|
-
|*
|
642
|
-
| The
|
643
|
-
|
682
|
+
|*DECIDIM_MACHINE_TRANSLATION_SERVICE*
|
683
|
+
| The name of the class to translate user content.
|
684
|
+
Read more about this at xref:services:machine_translation.adoc[Machine Translation] service page.
|
685
|
+
| nil
|
644
686
|
| No
|
645
687
|
|
646
|
-
|
647
|
-
|
648
|
-
|
|
688
|
+
|
689
|
+
|*DECIDIM_SMS_GATEWAY_SERVICE*
|
690
|
+
| The name of the class to deliver SMS codes to users.
|
691
|
+
Read more about this at xref:services:sms.adoc[SMS] service page.
|
692
|
+
| nil
|
649
693
|
| No
|
650
694
|
|
651
|
-
|*
|
652
|
-
| The
|
653
|
-
|
695
|
+
|*DECIDIM_TIMESTAMP_SERVICE*
|
696
|
+
| The name of the class used to generate a timestamp from a document.
|
697
|
+
Read more about this at xref:services:timestamp.adoc[Timestamp] service page.
|
698
|
+
| nil
|
699
|
+
| No
|
700
|
+
|
701
|
+
|*DECIDIM_PDF_SIGNATURE_SERVICE*
|
702
|
+
| The name of the class used to process a pdf and add a signature to the document.
|
703
|
+
Read more about this at xref:services:pdf.adoc[PDF signing] service page.
|
704
|
+
| nil
|
705
|
+
| No
|
706
|
+
|
707
|
+
|*DECIDIM_USER_ROLES*
|
708
|
+
| The list of roles a user can have, not considering the space-specific roles.
|
709
|
+
| admin, user_manager
|
710
|
+
| No
|
711
|
+
|
712
|
+
|*DECIDIM_AMENDMENTS_VISIBILITY_OPTIONS*
|
713
|
+
| The list of visibility options for amendments.
|
714
|
+
| all, participants
|
654
715
|
| No
|
655
716
|
|
717
|
+
|*DECIDIM_DEFAULT_MAX_LAST_ACTIVITY_USERS*
|
718
|
+
| The default max last activity users to be shown
|
719
|
+
| 6
|
720
|
+
| No
|
721
|
+
|
722
|
+
|DECIDIM_OAUTH_ACCESS_TOKEN_EXPIRES_IN
|
723
|
+
|OAuth access token expiration time in minutes.
|
724
|
+
|120
|
725
|
+
|No
|
726
|
+
|
656
727
|
|===
|
657
728
|
|
658
729
|
.Optional Env Vars fine tuning some Decidim modules (such the API or Proposal behaviors)
|
@@ -675,6 +746,26 @@ Additional context: This has been revealed as an issue during a security audit o
|
|
675
746
|
|15
|
676
747
|
|No
|
677
748
|
|
749
|
+
|DECIDIM_API_JWT_SECRET
|
750
|
+
|This secret is being used by the devise-jwt to sign the tokens being generated for the api users.
|
751
|
+
|
|
752
|
+
|Yes
|
753
|
+
|
754
|
+
|DECIDIM_API_JWT_EXPIRES_IN
|
755
|
+
|The expiration time of the JWT tokens in minutes, after which issued token will expire.
|
756
|
+
|(value of DECIDIM_OAUTH_ACCESS_TOKEN_EXPIRES_IN)
|
757
|
+
|No
|
758
|
+
|
759
|
+
|DECIDIM_API_FORCE_API_AUTHENTICATION
|
760
|
+
|Enable authentication for using api through setting Api configuration option. This is used to filter out unauthorized users from using api endpoint.
|
761
|
+
|false
|
762
|
+
|No
|
763
|
+
|
764
|
+
| DECIDIM_API_DISCLOSE_SYSTEM_VERSION
|
765
|
+
| This Environment variable instructs decidim whether to display or not the exact version of the application. By default, this is set to false to avoid explicit exposure of Decidim version.
|
766
|
+
| false
|
767
|
+
| No
|
768
|
+
|
678
769
|
|PROPOSALS_PARTICIPATORY_SPACE_HIGHLIGHTED_PROPOSALS_LIMIT
|
679
770
|
|Number of proposals to be shown in blocks with highlighted content across different participatory spaces.
|
680
771
|
|4
|
@@ -690,30 +781,14 @@ Additional context: This has been revealed as an issue during a security audit o
|
|
690
781
|
|2
|
691
782
|
|No
|
692
783
|
|
693
|
-
|MEETINGS_ENABLE_PROPOSAL_LINKING
|
694
|
-
|If true, enables several relationships between meetings and proposals. By default is active if Proposals are active (which is true always at the moment).
|
695
|
-
|
696
|
-
*We recommend not to tamper with this setting unless you know what are you doing*
|
697
|
-
|auto
|
698
|
-
|No
|
699
|
-
|
700
784
|
|MEETINGS_EMBEDDABLE_SERVICES
|
701
785
|
|A list (separated by spaces) of allowed services that can be embedded in a iframe when creating an online meeting.
|
702
786
|
|www.youtube.com www.twitch.tv meet.jit.si
|
703
787
|
|No
|
704
788
|
|
705
|
-
|
|
706
|
-
|If
|
707
|
-
|
708
|
-
*We recommend not to tamper with this setting unless you know what are you doing*
|
709
|
-
|auto
|
710
|
-
|No
|
711
|
-
|
712
|
-
|ACCOUNTABILITY_ENABLE_PROPOSAL_LINKING
|
713
|
-
|If true, enables several relationships between the accountability module and proposals. By default is active if Proposals are active (which is true always at the moment).
|
714
|
-
|
715
|
-
*We recommend not to tamper with this setting unless you know what are you doing*
|
716
|
-
|auto
|
789
|
+
|MEETINGS_WAITING_LIST_ENABLED
|
790
|
+
|If set to "false", disables the waiting list feature for meetings. Enabled by default.
|
791
|
+
|true
|
717
792
|
|No
|
718
793
|
|
719
794
|
|INITIATIVES_CREATION_ENABLED
|
@@ -781,9 +856,79 @@ After this time the initiative will be moved to discarded state.
|
|
781
856
|
|false
|
782
857
|
|No
|
783
858
|
|
859
|
+
|INITIATIVES_SIGNATURE_HANDLER_ENCRYPTION_SECRET
|
860
|
+
|Secret used by the base class Decidim::Initiatives::SignatureHandler to encrypt the user personal data that will be stored in the initiatives votes.
|
861
|
+
|personal user metadata
|
862
|
+
|No
|
863
|
+
|
864
|
+
|*DECIDIM_SPAM_REPORTING_USER*
|
865
|
+
| This is the email address used by the spam engine to properly identify the user that will report users and content
|
866
|
+
| decidim-reporting-user@example.org
|
867
|
+
| No
|
868
|
+
|
869
|
+
|*DECIDIM_SPAM_DETECTION_RESOURCE_SCORE_THRESHOLD*
|
870
|
+
| This is the threshold used to report resources. If the score falls under this value, the resource will not be reported.
|
871
|
+
| 0.75
|
872
|
+
| No
|
873
|
+
|
874
|
+
|*DECIDIM_SPAM_DETECTION_USER_SCORE_THRESHOLD*
|
875
|
+
| This is the threshold used to report users. If the score falls under this value, the user will not be reported.
|
876
|
+
| 0.75
|
877
|
+
| No
|
878
|
+
|
879
|
+
|*DECIDIM_SPAM_DETECTION_DELAY_IN_SECONDS*
|
880
|
+
| You can configure the spam delay for the spam detection service. It is recommended not to set it to 0, as the request may not finished (ex: resources could not yet exist in Database)
|
881
|
+
| 30
|
882
|
+
| No
|
883
|
+
|
884
|
+
|*DECIDIM_SPAM_DETECTION_BACKEND_USER*
|
885
|
+
| The adapter type needed for user classifier. (for CI purposes, you can set "memory")
|
886
|
+
| redis
|
887
|
+
| No
|
888
|
+
|
889
|
+
|*DECIDIM_SPAM_DETECTION_BACKEND_USER_REDIS_URL*
|
890
|
+
| The redis connection url used by the user classifier
|
891
|
+
| redis://localhost:6379/3
|
892
|
+
| No
|
893
|
+
|
894
|
+
|*DECIDIM_SPAM_DETECTION_BACKEND_RESOURCE*
|
895
|
+
| The adapter type needed for resource classifier. (for CI purposes, you can set "memory")
|
896
|
+
| redis
|
897
|
+
| No
|
898
|
+
|
899
|
+
|*DECIDIM_SPAM_DETECTION_BACKEND_RESOURCE_REDIS_URL*
|
900
|
+
| The redis connection url used by the resource classifier
|
901
|
+
| redis://localhost:6379/2
|
902
|
+
| No
|
903
|
+
|
904
|
+
|*DECIDIM_SPAM_DETECTION_RESOURCE_SERVICE*
|
905
|
+
| Spam detection service class.
|
906
|
+
| Decidim::Ai::SpamDetection::Service
|
907
|
+
| No
|
908
|
+
|
909
|
+
|*DECIDIM_SPAM_DETECTION_USER_SERVICE*
|
910
|
+
| Spam detection service class.
|
911
|
+
| Decidim::Ai::SpamDetection::Service
|
912
|
+
| No
|
913
|
+
|
914
|
+
|*DECIDIM_AI_LANGUAGE_FORMATTER*
|
915
|
+
| Text cleanup service
|
916
|
+
| Decidim::Ai::Language::Formatter
|
917
|
+
| No
|
918
|
+
|
919
|
+
|*DECIDIM_SPAM_HIDE_REPORTED_RESOURCES_AUTOMATICALLY*
|
920
|
+
| When the engine is consistently marking spam content without errors, you can skip human intervention by enabling this functionality
|
921
|
+
| false
|
922
|
+
| No
|
923
|
+
|
924
|
+
|*VERIFICATIONS_DOCUMENT_TYPES*
|
925
|
+
| For the verification of the participants' data in Verifications, you can configure which type of documents a participant can have. By default these documents are `identification_number` and `passport`
|
926
|
+
| identification_number,passport
|
927
|
+
| No
|
928
|
+
|
784
929
|
|===
|
785
930
|
|
786
|
-
.Optional Env Vars for extra
|
931
|
+
.Optional Env Vars for extra configuration
|
787
932
|
[%autowidth.stretch]
|
788
933
|
|===
|
789
934
|
|Name |Value |Default value|Multitenant's System configurable
|
@@ -827,7 +972,11 @@ Note that this only applies to production environments.
|
|
827
972
|
|5
|
828
973
|
|No
|
829
974
|
|
975
|
+
|SLOW_SEEDS
|
976
|
+
|If seeding an environment that needs to have more data, please use `SLOW_SEEDS` environment variable to add it.
|
977
|
+
|false
|
978
|
+
|No
|
979
|
+
|
830
980
|
|===
|
831
981
|
|
832
982
|
Please take care that all these configurations would be the defaults but *some of these could also be changed on a Multitenant's System configuration* (for instance SMTP or OAUTH providers).
|
833
|
-
|
@@ -45,12 +45,11 @@ Then make use of the related xref:configure:environment_variables.adoc[Environme
|
|
45
45
|
Just as a reminder, these files are important:
|
46
46
|
|
47
47
|
* config/database.yml
|
48
|
-
* config/secrets.yml
|
49
48
|
|
50
49
|
Although most of these settings you can change them through xref:configure:environment_variables.adoc[Environment Variables].
|
51
50
|
|
52
51
|
You also have more settings in:
|
53
52
|
|
54
53
|
* xref:configure:initializer.adoc[Decidim initializer file].
|
55
|
-
*
|
56
|
-
|
54
|
+
* xref:configure:environment_variables.adoc[Environment variables].
|
55
|
+
* xref:configure:system.adoc[System panel].
|
@@ -1,15 +1,23 @@
|
|
1
1
|
= Initializer
|
2
2
|
|
3
|
-
|
3
|
+
Decidim relies heavily on the xref:configure:environment_variables.adoc[environment variables], and we strongly recommend to use them, however, when the xref:configure:environment_variables.adoc[environment variables] are not enough, you can use a plain Rails initializer. Starting with Decidim `0.31.0` we will not generate this file, but, if you really need it, you can create in your application a file named `config/initializer/decidim.rb`.
|
4
4
|
|
5
|
-
If you need to add special logic or if you feel more comfortable working with Ruby code instead of Environment Variables, then you can
|
5
|
+
If you need to add special logic or if you feel more comfortable working with Ruby code instead of xref:configure:environment_variables.adoc[Environment Variables], then you can do all the changes that you need directly in the initializer file. Take into account that this file could be published in a Version Control System (like `git`) so you should be careful with the secrets/API keys that you add here.
|
6
6
|
|
7
7
|
Remember to restart your server when making changes in this file.
|
8
8
|
|
9
|
-
This is where you can change the behaviour defined on the different components (most notably from `decidim-core`).
|
10
|
-
|
11
9
|
After making changes to this file you will need to also restart your application server.
|
12
10
|
|
11
|
+
== File format
|
12
|
+
|
13
|
+
[source,ruby]
|
14
|
+
....
|
15
|
+
# config/initializer/decidim.rb
|
16
|
+
Decidim.configure do |config|
|
17
|
+
# here you can add any key config from below.
|
18
|
+
end
|
19
|
+
....
|
20
|
+
|
13
21
|
== Application name
|
14
22
|
|
15
23
|
The name of the application.
|
@@ -107,7 +115,7 @@ Allows to make geographical mapping in some components, like Proposals or Meetin
|
|
107
115
|
....
|
108
116
|
config.geocoder = {
|
109
117
|
static_map_url: "https://image.maps.hereapi.com/mia/v3/base/mc/overlay",
|
110
|
-
here_api_key:
|
118
|
+
here_api_key: ENV["MAPS_API_KEY"]
|
111
119
|
}
|
112
120
|
....
|
113
121
|
|
@@ -154,7 +162,7 @@ Mind that this depends on your environment, for instance you could also need to
|
|
154
162
|
|
155
163
|
[source,ruby]
|
156
164
|
....
|
157
|
-
config.maximum_attachment_size = 10
|
165
|
+
config.maximum_attachment_size = 10
|
158
166
|
....
|
159
167
|
|
160
168
|
=== User avatar file size
|
@@ -165,7 +173,7 @@ Mind that this depends on your environment, for instance you could also need to
|
|
165
173
|
|
166
174
|
[source,ruby]
|
167
175
|
....
|
168
|
-
config.maximum_avatar_size = 10
|
176
|
+
config.maximum_avatar_size = 10
|
169
177
|
....
|
170
178
|
|
171
179
|
== Reports
|
@@ -281,11 +289,11 @@ class MySMSGatewayService
|
|
281
289
|
end
|
282
290
|
....
|
283
291
|
|
284
|
-
Then you will need to configure it
|
292
|
+
Then you will need to configure it with the help of Environment Variables:
|
285
293
|
|
286
|
-
[source,
|
294
|
+
[source,bash]
|
287
295
|
....
|
288
|
-
|
296
|
+
export DECIDIM_SMS_GATEWAY_SERVICE="MySMSGatewayService"
|
289
297
|
....
|
290
298
|
|
291
299
|
== Timestamp service configuration
|
@@ -313,11 +321,11 @@ class MyTimestampService
|
|
313
321
|
end
|
314
322
|
....
|
315
323
|
|
316
|
-
Then you will need to configure it
|
324
|
+
Then you will need to configure it with the help of Environment Variables:
|
317
325
|
|
318
|
-
[source,
|
326
|
+
[source,bash]
|
319
327
|
....
|
320
|
-
|
328
|
+
export DECIDIM_TIMESTAMP_SERVICE="MyTimestampService"
|
321
329
|
....
|
322
330
|
|
323
331
|
== PDF signature service
|
@@ -344,8 +352,13 @@ An example class would be something like:
|
|
344
352
|
# Code to return the pdf signed
|
345
353
|
end
|
346
354
|
end
|
355
|
+
....
|
356
|
+
|
357
|
+
Then you will need to configure it with the help of Environment Variables:
|
347
358
|
|
348
|
-
|
359
|
+
[source,bash]
|
360
|
+
....
|
361
|
+
export DECIDIM_PDF_SIGNATURE_SERVICE="PdfSignatureExample"
|
349
362
|
....
|
350
363
|
|
351
364
|
== Etherpad configuration
|
@@ -357,9 +370,9 @@ xref:services:etherpad.adoc[Etherpad's Decidim docs] in order to set it up.
|
|
357
370
|
[source,ruby]
|
358
371
|
....
|
359
372
|
config.etherpad = {
|
360
|
-
server:
|
361
|
-
api_key:
|
362
|
-
api_version:
|
373
|
+
server: ENV["ETHERPAD_SERVER"],
|
374
|
+
api_key: ENV["ETHERPAD_API_KEY"],
|
375
|
+
api_version: Decidim::Env.new("ETHERPAD_API_VERSION", "1.2.1")
|
363
376
|
}
|
364
377
|
....
|
365
378
|
|
@@ -367,29 +380,30 @@ xref:services:etherpad.adoc[Etherpad's Decidim docs] in order to set it up.
|
|
367
380
|
|
368
381
|
To enable machine translations you need to enable the service and specify the class used for translation (this usually is the one contacting an external API from a 3d party service that actually translates the string).
|
369
382
|
|
370
|
-
[source,
|
383
|
+
[source,bash]
|
371
384
|
....
|
372
|
-
|
373
|
-
|
385
|
+
export DECIDIM_ENABLE_MACHINE_TRANSLATION="true"
|
386
|
+
export DECIDIM_MACHINE_TRANSLATION_SERVICE="MyTranslationService"
|
374
387
|
....
|
375
|
-
|
376
388
|
An example class would be something like:
|
377
389
|
|
378
390
|
[source,ruby]
|
379
391
|
....
|
380
|
-
|
381
|
-
|
392
|
+
class MyTranslationService
|
393
|
+
attr_reader :text, :source_locale, :target_locale, :resource, :field_name
|
382
394
|
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
395
|
+
def initialize(resource, field_name, text, target_locale, source_locale)
|
396
|
+
@resource = resource
|
397
|
+
@field_name = field_name
|
398
|
+
@text = text
|
399
|
+
@target_locale = target_locale
|
400
|
+
@source_locale = source_locale
|
401
|
+
end
|
388
402
|
|
389
|
-
|
390
|
-
|
391
|
-
end
|
403
|
+
def translate
|
404
|
+
# Actual code to translate the text
|
392
405
|
end
|
406
|
+
end
|
393
407
|
....
|
394
408
|
|
395
409
|
See xref:develop:machine_translations.adoc[Machine Translations] for more information about how it works and how to set it up.
|
@@ -76,7 +76,7 @@ Enter each one of them in a new line. For instance, "example.com".
|
|
76
76
|
|Required
|
77
77
|
|You need to configure at least one language. Decidim is multilingual, meaning that you can have most of the admin
|
78
78
|
contents with any number of languages. For seeing other languages you need to configure first the
|
79
|
-
xref:configure:
|
79
|
+
xref:configure:environment_variables.adoc[Decidim's Environment Variables].
|
80
80
|
|
81
81
|
|Force authentication
|
82
82
|
|Optional
|
@@ -127,8 +127,8 @@ in multi tenant mode. To learn more, check this https://developer.mozilla.org/en
|
|
127
127
|
==== Allow participants to register and login
|
128
128
|
|
129
129
|
Most of the installations use this setting. Means that everyone can register a participant account and login, without restrictions, only with an email account confirmation.
|
130
|
-
You can disable that confirmation also if you want to through xref:configure:
|
131
|
-
as it is a measure for stopping spam accounts.
|
130
|
+
You can disable that confirmation also if you want to through xref:configure:environment_variables.adoc.adoc[Decidim's environment variables], although we do not recommend doing that,
|
131
|
+
as it is a measure for stopping spam accounts. For additional details, read about `DECIDIM_UNCONFIRMED_ACCESS_FOR` environment variable.
|
132
132
|
|
133
133
|
==== Do not allow participants to register, but allow existing participants to login
|
134
134
|
|
Binary file
|
@@ -12,8 +12,8 @@ For example, to add new filter to proposals index:
|
|
12
12
|
....
|
13
13
|
Decidim.admin_filter(:proposals) do |filter|
|
14
14
|
# An example of how to access to the context. In this case the custom
|
15
|
-
# filter is only enabled for
|
16
|
-
if current_participatory_space.user_roles(:
|
15
|
+
# filter is only enabled for evaluators of the space
|
16
|
+
if current_participatory_space.user_roles(:evaluator).where(user: current_user).exists?
|
17
17
|
filter.add_filters(:custom_new_filter)
|
18
18
|
filter.add_filters_with_values(custom_new_filter: %w(custom_new_value_1 custom_new_value_2))
|
19
19
|
end
|
@@ -17,7 +17,7 @@ By default, the CSP is enabled, and is configured to be as restrictive as possib
|
|
17
17
|
}
|
18
18
|
....
|
19
19
|
|
20
|
-
In order to customize the CSP we are providing, have 2 options, either by using a configuration key the initializer
|
20
|
+
In order to customize the CSP we are providing, have 2 options, either by using a configuration key the xref:configure:initializer.adoc[initializer] or by setting values in the Organization's xref:configure:system.adoc[system panel].
|
21
21
|
|
22
22
|
Using the initializer is the recommended way to customize the CSP when you have multiple organizations sharing the same Decidim instance, sharing the same tools. Fox example, if you are using a custom map provider, you will need to add the domain to the CSP, so that the map can be displayed. In this case, you will need to add the following to your initializer:
|
23
23
|
|
@@ -2,6 +2,6 @@
|
|
2
2
|
|
3
3
|
You can change most of the images (for instance the logo, main banner on homepage, contents of participatory processes, etc) through the Administration panel.
|
4
4
|
|
5
|
-
As Decidim uses
|
5
|
+
As Decidim uses Shakapacker, there is no way to override existing images including in Decidim.
|
6
6
|
|
7
7
|
If you want to add a new image you can do it as any Rails application, leaving it on your image's asset folder (`app/packs/images`) and using image_pack_tag helper (or asset_pack_path). You can see more documentation on http://guides.rubyonrails.org/webpacker.html[Rails guide].
|