decidim 0.23.6 → 0.24.0.rc1

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.

Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -0
  3. data/docs/README.adoc +74 -0
  4. data/docs/antora.yml +7 -0
  5. data/docs/modules/configure/pages/environment_variables.adoc +69 -0
  6. data/docs/modules/configure/pages/index.adoc +16 -0
  7. data/docs/modules/configure/pages/initializer.adoc +376 -0
  8. data/docs/modules/customize/assets/images/header-snippet.png +0 -0
  9. data/docs/modules/customize/assets/images/menu.png +0 -0
  10. data/docs/modules/customize/assets/images/organization-colors.png +0 -0
  11. data/docs/modules/customize/pages/authorizations.adoc +22 -0
  12. data/docs/{customization/code.md → modules/customize/pages/code.adoc} +12 -9
  13. data/docs/{customization/gemfile.md → modules/customize/pages/gemfile.adoc} +5 -4
  14. data/docs/modules/customize/pages/images.adoc +7 -0
  15. data/docs/modules/customize/pages/javascript.adoc +59 -0
  16. data/docs/modules/customize/pages/menu.adoc +25 -0
  17. data/docs/modules/customize/pages/oauth.adoc +33 -0
  18. data/docs/modules/customize/pages/styles.adoc +64 -0
  19. data/docs/modules/customize/pages/texts.adoc +30 -0
  20. data/docs/modules/customize/pages/users_registration_mode.adoc +17 -0
  21. data/docs/{customization/views.md → modules/customize/pages/views.adoc} +13 -13
  22. data/docs/modules/develop/assets/images/barcelona.png +0 -0
  23. data/docs/modules/develop/assets/images/helsinki.png +0 -0
  24. data/docs/modules/develop/assets/images/indices.png +0 -0
  25. data/docs/{advanced/api.md → modules/develop/pages/api.adoc} +2 -2
  26. data/docs/{advanced/authorship.md → modules/develop/pages/authorable.adoc} +5 -5
  27. data/docs/modules/develop/pages/c4_component.adoc +91 -0
  28. data/docs/modules/develop/pages/c4_container.adoc +42 -0
  29. data/docs/modules/develop/pages/c4_context.adoc +35 -0
  30. data/docs/{advanced/components.md → modules/develop/pages/components.adoc} +47 -10
  31. data/docs/{advanced/content_blocks.md → modules/develop/pages/content_blocks.adoc} +16 -13
  32. data/docs/{advanced/content_processors.md → modules/develop/pages/content_processors.adoc} +25 -19
  33. data/docs/modules/develop/pages/data-picker.adoc +85 -0
  34. data/docs/modules/develop/pages/deploy.adoc +15 -0
  35. data/docs/modules/develop/pages/docker.adoc +12 -0
  36. data/docs/{advanced/embeddable.md → modules/develop/pages/embeddable.adoc} +6 -6
  37. data/docs/{advanced/endorsable.md → modules/develop/pages/endorsable.adoc} +31 -25
  38. data/docs/{advanced/fixing_locales.md → modules/develop/pages/fixing_locales.adoc} +36 -23
  39. data/docs/{advanced/followers.md → modules/develop/pages/followable.adoc} +9 -8
  40. data/docs/modules/develop/pages/guide.adoc +16 -0
  41. data/docs/modules/develop/pages/guide_architecture.adoc +17 -0
  42. data/docs/modules/develop/pages/guide_changelog.adoc +8 -0
  43. data/docs/modules/develop/pages/guide_commands.adoc +86 -0
  44. data/docs/modules/develop/pages/guide_development_app.adoc +44 -0
  45. data/docs/modules/develop/pages/guide_development_with_custom_seed_data.adoc +31 -0
  46. data/docs/modules/develop/pages/guide_development_with_localhost_ssl.adoc +63 -0
  47. data/docs/modules/develop/pages/guide_example_apps.adoc +59 -0
  48. data/docs/modules/develop/pages/guide_git_conventions.adoc +75 -0
  49. data/docs/modules/develop/pages/guide_github_projects.adoc +42 -0
  50. data/docs/modules/develop/pages/guide_semver.adoc +7 -0
  51. data/docs/{advanced/how_to_fix_metrics.md → modules/develop/pages/how_to_fix_metrics.adoc} +76 -59
  52. data/docs/modules/develop/pages/machine_translations.adoc +42 -0
  53. data/docs/modules/develop/pages/managing_translations_i18n.adoc +24 -0
  54. data/docs/modules/develop/pages/maps.adoc +499 -0
  55. data/docs/modules/develop/pages/metrics.adoc +119 -0
  56. data/docs/{advanced/modules.md → modules/develop/pages/modules.adoc} +16 -6
  57. data/docs/{advanced/newsletter_templates.md → modules/develop/pages/newsletter_templates.adoc} +12 -10
  58. data/docs/{advanced/notifications.md → modules/develop/pages/notifications.adoc} +40 -38
  59. data/docs/{advanced/open-data.md → modules/develop/pages/open-data.adoc} +4 -3
  60. data/docs/modules/develop/pages/permissions.adoc +92 -0
  61. data/docs/{advanced/profiling.md → modules/develop/pages/profiling.adoc} +15 -12
  62. data/docs/modules/develop/pages/releases.adoc +148 -0
  63. data/docs/modules/develop/pages/reportable.adoc +31 -0
  64. data/docs/modules/develop/pages/security.adoc +33 -0
  65. data/docs/{advanced/share_tokens.md → modules/develop/pages/share_tokens.adoc} +18 -14
  66. data/docs/{advanced/templates.md → modules/develop/pages/templates.adoc} +14 -12
  67. data/docs/{advanced/testing.md → modules/develop/pages/testing.adoc} +21 -20
  68. data/docs/{advanced/activity_log.md → modules/develop/pages/traceable.adoc} +31 -26
  69. data/docs/modules/develop/pages/turbolinks.adoc +7 -0
  70. data/docs/{advanced/view_hooks.md → modules/develop/pages/view_hooks.adoc} +29 -23
  71. data/docs/modules/develop/pages/view_models_aka_cells.adoc +105 -0
  72. data/docs/modules/install/pages/checklist.adoc +39 -0
  73. data/docs/modules/install/pages/index.adoc +148 -0
  74. data/docs/{manual-installation.md → modules/install/pages/manual.adoc} +54 -42
  75. data/docs/modules/install/pages/update.adoc +95 -0
  76. data/docs/{services/activejob.md → modules/services/pages/activejob.adoc} +3 -3
  77. data/docs/modules/services/pages/elections_bulletin_board.adoc +52 -0
  78. data/docs/{services/etherpad.md → modules/services/pages/etherpad.adoc} +15 -12
  79. data/docs/modules/services/pages/maps.adoc +311 -0
  80. data/docs/modules/services/pages/smtp.adoc +10 -0
  81. data/docs/modules/services/pages/social_providers.adoc +122 -0
  82. data/lib/decidim/gem_manager.rb +5 -5
  83. data/lib/decidim/version.rb +1 -1
  84. metadata +137 -100
  85. data/README.md +0 -157
  86. data/docs/advanced/add_authorizable_action.md +0 -63
  87. data/docs/advanced/adding_fixtures_aka_dummy_content.md +0 -9
  88. data/docs/advanced/data-picker.md +0 -83
  89. data/docs/advanced/deploy.md +0 -9
  90. data/docs/advanced/how_to_create_a_module.md +0 -9
  91. data/docs/advanced/machine_translation_service.md +0 -12
  92. data/docs/advanced/managing_translations_i18n.md +0 -24
  93. data/docs/advanced/metrics.md +0 -114
  94. data/docs/advanced/permissions.md +0 -23
  95. data/docs/advanced/releases.md +0 -114
  96. data/docs/advanced/tradeoffs.md +0 -14
  97. data/docs/advanced/view_models_aka_cells.md +0 -99
  98. data/docs/checklist.md +0 -55
  99. data/docs/customization/authorizations.md +0 -5
  100. data/docs/customization/images.md +0 -7
  101. data/docs/customization/javascript.md +0 -9
  102. data/docs/customization/machine_translations.md +0 -30
  103. data/docs/customization/maps.md +0 -610
  104. data/docs/customization/oauth.md +0 -50
  105. data/docs/customization/styles.md +0 -11
  106. data/docs/customization/texts.md +0 -27
  107. data/docs/customization/users_registration_mode.md +0 -17
  108. data/docs/development_guide.md +0 -166
  109. data/docs/getting_started.md +0 -191
  110. data/docs/possible_flows_for_proposal.png +0 -0
  111. data/docs/services/analytics.md +0 -23
  112. data/docs/services/elections_bulletin_board.md +0 -38
  113. data/docs/services/maps.md +0 -362
  114. data/docs/services/social_providers.md +0 -98
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd64e9c973cde4c71d9f0d39a1fa84972135ae3ddcfa91aedfa3f250d953aa86
4
- data.tar.gz: 738b2d35647c9b205ea943c69b73a4ad78d51207a8feb380fb91b6efdf641e78
3
+ metadata.gz: 9b8cc06811557ba36021b2bcee0d250bc319bf9b64e8f2510c35a3952772ca34
4
+ data.tar.gz: c43b462d704a1f81d06616e969faa559bb718fc80ff32f75149e35e7dcbce715
5
5
  SHA512:
6
- metadata.gz: 61f5edf1d9a95dc0528ce38c6f47086148562f714e7d46e122d810cdde640f8a445f62e22a5b6756212fbe79d9d3073e3ddd0abc9c10b256503c4d7301cbaf3e
7
- data.tar.gz: 3e379c57d7c5cc9d272bb4863938f105e236c9ef125a46853ac63ba98078730e07f7a8f107c9f40660dcfc610446b08b4ddf6f61c0dba6820c6c23ae51b9e0fb
6
+ metadata.gz: c8442ad8b7906eed963bdc31cf4787e91bb9836232bd565f4e31e640ec05378116291b44c8580d238cc966a8bf2f5a1ef2f8f3d0cc2368208e412af5eab643b8
7
+ data.tar.gz: d2b06c1b6980cd9b88ba646c4ec159f7f08cad01887c407d5a23e96c4a378087977b9fe42e85dc224b12679aec4a7496fdbdd02ae5b68f55639620c404106913
data/Rakefile CHANGED
@@ -83,6 +83,7 @@ desc "Bundle all Gemfiles"
83
83
  task :bundle do
84
84
  [".", "decidim-generators", "decidim_app-design"].each do |dir|
85
85
  Bundler.with_original_env do
86
+ puts "Updating #{dir}...\n"
86
87
  Dir.chdir(dir) { sh "bundle install" }
87
88
  end
88
89
  end
data/docs/README.adoc ADDED
@@ -0,0 +1,74 @@
1
+ = Decidim Developer Documentation
2
+
3
+ == What's this?
4
+
5
+ This is the internal Decidim documentation.
6
+ If you want to see it in a nice UI you can do it at the https://docs.decidim.org[Decidim Documentation Site].
7
+ Some of the sections are available on https://github.com/decidim/documentation[Decidim Documentation repository].
8
+
9
+ == How this works?
10
+
11
+ This is made with https://antora.org/[Antora].
12
+ It uses https://asciidoc.org/[AsciiDoc] mark-up document format.
13
+ It's pretty similar to Markdown, although is more standarized and can do more complex things.
14
+ Read more about https://asciidoctor.org/docs/asciidoc-vs-markdown/[Markdown vs AsciiDoc].
15
+
16
+ If you want to convert from Markdown to AsciiDoc:
17
+
18
+ . online pandoc conversor or
19
+ . using kramdoc:
20
+
21
+ [source,bash]
22
+ ----
23
+ gem install kramdown-asciidoc
24
+ kramdoc --format=GFM --output=your-doc.adoc --wrap=ventilate your-doc.md
25
+ ----
26
+
27
+ The nice thing about Antora is that you can have multi-repositories for your documentation, so we have some technical sections in this repository (like Install, Customize and Develop) and other sections that are not for developers or system administrators on the https://github.com/decidim/documentation[other repository].
28
+
29
+ == Local development
30
+
31
+ If you want to try changes in this folder and how it'd be shown in https://docs.decidim.org[Decidim Documentation site], you need to do these next steps:
32
+
33
+ . Clone the repository
34
+ . Install dependencies
35
+ . Change the antora-playbook.yml url key in source
36
+ . Build the antora playbook
37
+ . Open the generated website with your web browser
38
+
39
+ In detail each one of these steps are:
40
+
41
+ [source,bash]
42
+ ----
43
+ # 1. Clone the repository
44
+ git clone https://github.com/decidim/documentation
45
+ # 2. Install dependencies
46
+ npm install
47
+ # 3. Change the antora-playbook.yml url key in source
48
+ # 4. Build the antora playbook
49
+ npm run build
50
+ # 5. Open the generated website with your web browser
51
+ xdg-open build/site/index.html
52
+ ----
53
+
54
+ Regarding "3. Change the antora-playbook.yml url key in source", if this is the configuration at antora-playbook.yml:
55
+
56
+ [source,yaml]
57
+ ----
58
+ - url: https://github.com/decidim/decidim
59
+ start_path: docs
60
+ branches: develop
61
+ ----
62
+
63
+ Then the result would be:
64
+
65
+ [source,yaml]
66
+ ----
67
+ - url: /home/youruser/Work/decidim/decidim
68
+ start_path: docs
69
+ branches: develop
70
+ ----
71
+
72
+ == Add a new link in the sidebar
73
+
74
+ For adding a new link in the sidebar you need to add it in https://raw.githubusercontent.com/decidim/documentation/master/en/modules/ROOT/nav.adoc[nav.adoc file]
data/docs/antora.yml ADDED
@@ -0,0 +1,7 @@
1
+ name: en
2
+ title: "Decidim Developers Documentation"
3
+ version: master
4
+ asciidoc:
5
+ attributes:
6
+ page-lang: en@
7
+
@@ -0,0 +1,69 @@
1
+ = Environment Variables
2
+
3
+ We try to let most of the things defined through Environment Variables, as https://12factor.net/config[12factor applications's config]. You'll need to configure through your hosting provider (for example in Heroku), through a gem like `figaro` or through docker-compose `env_file`.
4
+
5
+ .Decidim Env Vars
6
+ |===
7
+ |Name |Value
8
+
9
+ |DATABASE_HOST
10
+ |Hostname for the Postgres database. Default is `localhost`.
11
+
12
+ |DATABASE_PASSWORD
13
+ |Password for the Postgres database
14
+
15
+ |DATABASE_PORT
16
+ |Port for the Postgres database. Default is `5432`.
17
+
18
+ |DATABASE_USERNAME
19
+ |Username for the Postgres database
20
+
21
+ |GEOCODER_API_KEY
22
+ |API key for Geocoder HERE.com
23
+
24
+ |OMNIAUTH_FACEBOOK_APP_ID
25
+ |App ID for enabling access through Facebook.com accounts. See xref:services:social_providers.adoc[Social Providers].
26
+
27
+ |OMNIAUTH_FACEBOOK_APP_SECRET
28
+ |App Secret for enabling access through Facebook.com accounts. See xref:services:social_providers.adoc[Social Providers].
29
+
30
+ |OMNIAUTH_GOOGLE_CLIENT_ID
31
+ |Client ID for enabling access through Google.com accounts. See xref:services:social_providers.adoc[Social Providers].
32
+
33
+ |OMNIAUTH_GOOGLE_CLIENT_SECRET
34
+ |Client Secret for enabling access through Google.com accounts. See xref:services:social_providers.adoc[Social Providers].
35
+
36
+ |OMNIAUTH_TWITTER_API_KEY
37
+ |API Key for enabling access through Google.com accounts. See xref:services:social_providers.adoc[Social Providers].
38
+
39
+ |OMNIAUTH_TWITTER_API_SECRET
40
+ |API Secret for enabling access through Google.com accounts. See xref:services:social_providers.adoc[Social Providers].
41
+
42
+ |PORT
43
+ |Specifies the `port` that Puma will listen on to receive requests. Default is 3000.
44
+
45
+ |RAILS_ENV
46
+ |Environment for Ruby on Rails. If it's on your local machine for development, then it should be `development`. If it's on server it should be `production`. Please take care that this has security implications. You DON'T want to be running a production application on development mode.
47
+
48
+ |RAILS_LOG_TO_STDOUT
49
+ |If true it'll show the log contents on the shell Standard Out. It's special relevant on certain hosting providers (for example, Heroku or Docker). It's also part of https://12factor.net/logs[12factor's recomendations].
50
+
51
+ |SECRET_KEY_BASE
52
+ |Secret key base for the Application. It's specially important that this is kept secret from the outside word; do NOT publish it on GitHub/GitLab/BitBucket.
53
+
54
+ |SMTP_ADDRESS
55
+ |Hostname for the SMTP server, for sending emails. See xref:services:smtp.adoc[SMTP]
56
+
57
+ |SMTP_DOMAIN
58
+ |Domain for the SMTP server, for sending emails. See xref:services:smtp.adoc[SMTP]
59
+
60
+ |SMTP_PASSWORD
61
+ |Password for the SMTP server, for sending emails. See xref:services:smtp.adoc[SMTP]
62
+
63
+ |SMTP_USERNAME
64
+ |Username for the SMTP server, for sending emails. See xref:services:smtp.adoc[SMTP]
65
+
66
+ |===
67
+
68
+ 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).
69
+
@@ -0,0 +1,16 @@
1
+ = Configuring
2
+
3
+ Decidim is a Ruby on Rails library, and as such we try to follow their conventions. Please read https://guides.rubyonrails.org/configuring.html[Configuring Rails Applications].
4
+
5
+ Just as a reminder, these files are important:
6
+
7
+ * config/database.yml
8
+ * config/secrets.yml
9
+
10
+ Although most of these settings you can change them through xref:configure:environment_variables.adoc[Environment Variables].
11
+
12
+ You also have more settings in:
13
+
14
+ * xref:configure:initializer.adoc[Decidim initializer file].
15
+ * System panel.
16
+
@@ -0,0 +1,376 @@
1
+ = Initializer
2
+
3
+ There are some settings that you'll need to change in the `config/initializer/decidim.rb` file.
4
+
5
+ This is where you can change the behaviour defined on the diferent components (most notably from `decidim-core`).
6
+
7
+ After making changes to this file you'll need to also restart your application server.
8
+
9
+ == Application name
10
+
11
+ The name of the application.
12
+
13
+ [source,ruby]
14
+ ....
15
+ config.application_name = "My Application Name"
16
+ ....
17
+
18
+ == Default mailer sender
19
+
20
+ The email that will be used as sender in all emails from Decidim.
21
+
22
+ [source,ruby]
23
+ ....
24
+ config.mailer_sender = "change-me@domain.org"
25
+ ....
26
+
27
+ == Available locales
28
+
29
+ Sets the list of available locales for the whole application.
30
+
31
+ When an organization is created through the System area, system admins will
32
+ be able to choose the available languages for that organization. That list
33
+ of languages will be equal or a subset of the list in this file.
34
+
35
+ [source,ruby]
36
+ ....
37
+ config.available_locales = [:en, :ca, :es]
38
+ ....
39
+
40
+ == Restrict system access
41
+
42
+ For extra security, restrict access to the system part with an authorized ip list.
43
+ You can use a single ip like ("1.2.3.4"), or an ip subnet like ("1.2.3.4/24")
44
+ You may specify multiple ip in an array ["1.2.3.4", "1.2.3.4/24"]
45
+
46
+ [source,ruby]
47
+ ....
48
+ config.system_accesslist_ips = ["127.0.0.1"]
49
+ ....
50
+
51
+ == Default locale
52
+
53
+ Sets the default locale for new organizations. When creating a new
54
+ organization from the System area, system admins will be able to overwrite
55
+ this value for that specific organization.
56
+
57
+ [source,ruby]
58
+ ....
59
+ config.default_locale = :en
60
+ ....
61
+
62
+ == Content Processors
63
+
64
+ Defines a list of custom content processors. They are used to parse and
65
+ render specific tags inside some user-provided content. Check the xref:develop:content_processor.adoc[Content Processor]
66
+ docs for more info.
67
+
68
+ [source,ruby]
69
+ ....
70
+ config.content_processors = []
71
+ ....
72
+
73
+ == Force SSL
74
+
75
+ Whether SSL should be enabled or not. Recommended for extra security.
76
+
77
+ [source,ruby]
78
+ ....
79
+ config.force_ssl = true
80
+ ....
81
+
82
+ == Geocoder configuration
83
+
84
+ Allows to make geographical mapping in some components, like Proposals or Meetings. It must be configured against a OpenStreetMap provider. See xref:services:geocoder.adoc[Geocoder service documentation].
85
+
86
+ [source,ruby]
87
+ ....
88
+ config.geocoder = {
89
+ static_map_url: "https://image.maps.ls.hereapi.com/mia/1.6/mapview",
90
+ here_api_key: Rails.application.secrets.geocoder[:here_api_key]
91
+ }
92
+ ....
93
+
94
+ == Custom resource reference
95
+
96
+ Custom resource reference generator method. See the See xref:admin:system_panel.adoc[System panel docs] for more information.
97
+
98
+ [source,ruby]
99
+ ....
100
+ config.reference_generator = lambda do |resource, component|
101
+ # Implement your custom method to generate resources references
102
+ "1234-#{resource.id}"
103
+ end
104
+ ....
105
+
106
+ == Currency unit
107
+
108
+ Allows to change the currency unit, for instance to `$`. By default is `€`.
109
+
110
+ [source,ruby]
111
+ ....
112
+ config.currency_unit = "€"
113
+ ....
114
+
115
+
116
+ == Image uploader settings
117
+
118
+ === Quality
119
+
120
+ Defines the quality of image uploads after processing. Image uploads are
121
+ processed by Decidim, this value helps reduce the size of the files.
122
+
123
+ [source,ruby]
124
+ ....
125
+
126
+ config.image_uploader_quality = 80
127
+ ....
128
+
129
+ === Attachment file size
130
+
131
+ The maximum file size of an attachment
132
+
133
+ Mind that this depends on your environment, for instance you could also need to change your web server configuration (nginx, apache, etc).
134
+
135
+ [source,ruby]
136
+ ....
137
+ config.maximum_attachment_size = 10.megabytes
138
+ ....
139
+
140
+ === User avatar file size
141
+
142
+ # The maximum file size for a user avatar
143
+
144
+ Mind that this depends on your environment, for instance you could also need to change your web server configuration (nginx, apache, etc).
145
+
146
+ [source,ruby]
147
+ ....
148
+ config.maximum_avatar_size = 10.megabytes
149
+ ....
150
+
151
+ == Reports
152
+
153
+ The number of reports which a resource can receive before hiding it.
154
+
155
+ [source,ruby]
156
+ ....
157
+ config.max_reports_before_hiding = 3
158
+ ....
159
+
160
+ == Custom HTML Header snippets
161
+
162
+ The most common use is to integrate third-party services that require some
163
+ extra JavaScript or CSS. Also, you can use it to add extra meta tags to the
164
+ HTML. Note that this will only be rendered in public pages, not in the admin
165
+ section.
166
+
167
+ Before enabling this you should ensure that any tracking that might be done
168
+ is in accordance with the rules and regulations that apply to your
169
+ environment and usage scenarios. This component also comes with the risk
170
+ that an organization's administrator injects malicious scripts to spy on or
171
+ take over user accounts.
172
+
173
+ [source,ruby]
174
+ ....
175
+ config.enable_html_header_snippets = false
176
+ ....
177
+
178
+ == Track newsletter links
179
+
180
+ Allow organizations admins to track newsletter links, trough UTMs. See https://en.wikipedia.org/wiki/UTM_parameters[UTM parameters in Wikipedia].
181
+
182
+ [source,ruby]
183
+ ....
184
+ config.track_newsletter_links = true
185
+ ....
186
+
187
+ == Data portability expiry time
188
+
189
+ Amount of time that the data portability files will be available in the server.
190
+
191
+ [source,ruby]
192
+ ....
193
+ config.data_portability_expiry_time = 7.days
194
+ ....
195
+
196
+ == Throttling settings
197
+
198
+ Security settings for blocking possible attacks.
199
+
200
+ === Max requests
201
+
202
+ Max requests in a time period to prevent DoS attacks. Only applied on production.
203
+
204
+ [source,ruby]
205
+ ....
206
+ config.throttling_max_requests = 100
207
+ ....
208
+
209
+ === Period
210
+
211
+ Time window in which the throttling is applied.
212
+
213
+ [source,ruby]
214
+ ....
215
+ config.throttling_period = 1.minute
216
+ ....
217
+
218
+ == Unconfirmed access for users
219
+
220
+ Time window were users can access the website even if their email is not confirmed.
221
+
222
+ [source,ruby]
223
+ ....
224
+ config.unconfirmed_access_for = 2.days
225
+ ....
226
+
227
+ == Base path for uploads
228
+
229
+ A base path for the uploads. If set, make sure it ends in a slash.
230
+ Uploads will be set to `<base_path>/uploads/`. This can be useful if you
231
+ want to use the same uploads place for both staging and production
232
+ environments, but in different folders.
233
+
234
+ If not set, it will be ignored.
235
+
236
+ [source,ruby]
237
+ ....
238
+ config.base_uploads_path = nil
239
+ ....
240
+
241
+ == SMS gateway configuration
242
+
243
+ If you want to verify your users by sending a verification code via
244
+ SMS you need to provide a SMS gateway service class.
245
+
246
+ An example class would be something like:
247
+
248
+ [source,ruby]
249
+ ....
250
+ class MySMSGatewayService
251
+ attr_reader :mobile_phone_number, :code
252
+ def initialize(mobile_phone_number, code)
253
+ @mobile_phone_number = mobile_phone_number
254
+ @code = code
255
+ end
256
+ def deliver_code
257
+ # Actual code to deliver the code
258
+ true
259
+ end
260
+ end
261
+ ....
262
+
263
+ Then you'll need to configure it in the Decidim initializer:
264
+
265
+ [source,ruby]
266
+ ....
267
+ config.sms_gateway_service = "MySMSGatewayService"
268
+ ....
269
+
270
+ == Timestamp service configuration
271
+
272
+ Used by `decidim-initiatives`.
273
+
274
+ Provide a class to generate a timestamp for a document. The instances of
275
+ this class are initialized with a hash containing the :document key with
276
+ the document to be timestamped as value. The istances respond to a
277
+ timestamp public method with the timestamp.
278
+
279
+ An example class would be something like:
280
+
281
+ [source,ruby]
282
+ ....
283
+ class MyTimestampService
284
+ attr_accessor :document
285
+ def initialize(args = {})
286
+ @document = args.fetch(:document)
287
+ end
288
+ def timestamp
289
+ # Code to generate timestamp
290
+ "My timestamp"
291
+ end
292
+ end
293
+ ....
294
+
295
+ Then you'll need to configure it in the Decidim initializer:
296
+
297
+ [source,ruby]
298
+ ....
299
+ config.timestamp_service = "MyTimestampService"
300
+ ....
301
+
302
+ == PDF signature service
303
+
304
+ Used by `decidim-initiatives`.
305
+
306
+ Provide a class to process a pdf and return the document including a
307
+ digital signature. The instances of this class are initialized with a hash
308
+ containing the :pdf key with the pdf file content as value. The instances
309
+ respond to a signed_pdf method containing the pdf with the signature.
310
+
311
+ An example class would be something like:
312
+
313
+ [source,ruby]
314
+ ....
315
+ class MyPDFSignatureService
316
+ attr_accessor :pdf
317
+
318
+ def initialize(args = {})
319
+ @pdf = args.fetch(:pdf)
320
+ end
321
+
322
+ def signed_pdf
323
+ # Code to return the pdf signed
324
+ end
325
+ end
326
+
327
+ config.pdf_signature_service = "MyPDFSignatureService"
328
+ ....
329
+
330
+ == Etherpad configuration
331
+
332
+
333
+ Only needed if you want to have Etherpad integration with Decidim. See
334
+ xref:services:etherpad.adoc[Etherpad's Decidim docs] in order to set it up.
335
+
336
+ [source,ruby]
337
+ ....
338
+ config.etherpad = {
339
+ server: Rails.application.secrets.etherpad[:server],
340
+ api_key: Rails.application.secrets.etherpad[:api_key],
341
+ api_version: Rails.application.secrets.etherpad[:api_version]
342
+ }
343
+ ....
344
+
345
+ == Default CSV column separator
346
+
347
+ Sets Decidim::Exporters::CSV's default column separator
348
+
349
+ [source,ruby]
350
+ ....
351
+ config.default_csv_col_sep = ";"
352
+ ....
353
+
354
+ == User Roles
355
+
356
+ The list of roles a user can have, not considering the space-specific roles.
357
+
358
+ [source,ruby]
359
+ ....
360
+ config.user_roles = %w(admin user_manager)
361
+ ....
362
+
363
+ == Visibility for Amendments
364
+
365
+ The list of visibility options for amendments. An Array of Strings that
366
+ serve both as locale keys and values to construct the input collection in Decidim::Amendment::VisibilityStepSetting::options.
367
+
368
+ This collection is used in Decidim::Admin::SettingsHelper to generate a
369
+ radio buttons collection input field form for a Decidim::Component
370
+ step setting :amendments_visibility.
371
+
372
+
373
+ [source,ruby]
374
+ ....
375
+ config.amendments_visibility_options = %w(all participants)
376
+ ....