decidim 0.31.5 → 0.32.0.rc2
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/shakapacker/runner.rb +4 -4
- data/decidim-core/lib/decidim/shakapacker/shakapacker.yml +28 -3
- data/decidim.gemspec +21 -24
- data/docs/antora.yml +1 -1
- data/docs/modules/configure/pages/environment_variables.adoc +4 -26
- data/docs/modules/customize/pages/logic.adoc +31 -0
- data/docs/modules/develop/assets/images/maintainers-backports-checker.png +0 -0
- data/docs/modules/develop/pages/api/authentication.adoc +95 -0
- data/docs/modules/develop/pages/api/core-concepts.adoc +535 -0
- data/docs/modules/develop/pages/api/index.adoc +83 -0
- data/docs/modules/develop/pages/api/reference/components/debates/close.adoc +48 -0
- data/docs/modules/develop/pages/api/reference/components/debates/create.adoc +58 -0
- data/docs/modules/develop/pages/api/reference/components/debates/update.adoc +63 -0
- data/docs/modules/develop/pages/api/reference/components/debates.adoc +9 -0
- data/docs/modules/develop/pages/api/reference/components/meetings/close.adoc +48 -0
- data/docs/modules/develop/pages/api/reference/components/meetings/create.adoc +108 -0
- data/docs/modules/develop/pages/api/reference/components/meetings/update.adoc +95 -0
- data/docs/modules/develop/pages/api/reference/components/meetings/withdraw.adoc +36 -0
- data/docs/modules/develop/pages/api/reference/components/meetings.adoc +10 -0
- data/docs/modules/develop/pages/api/reference/components/proposals/answer.adoc +82 -0
- data/docs/modules/develop/pages/api/reference/components/proposals/create.adoc +78 -0
- data/docs/modules/develop/pages/api/reference/components/proposals/update.adoc +66 -0
- data/docs/modules/develop/pages/api/reference/components/proposals/vote.adoc +73 -0
- data/docs/modules/develop/pages/api/reference/components/proposals/withdraw.adoc +38 -0
- data/docs/modules/develop/pages/api/reference/components/proposals.adoc +14 -0
- data/docs/modules/develop/pages/api/reference/errors/attribute_validation_error.adoc +38 -0
- data/docs/modules/develop/pages/api/reference/errors/introspection_disabled_error.adoc +19 -0
- data/docs/modules/develop/pages/api/reference/errors/invalid_locale_error.adoc +30 -0
- data/docs/modules/develop/pages/api/reference/errors/locale_error.adoc +30 -0
- data/docs/modules/develop/pages/api/reference/errors/not_found.adoc +30 -0
- data/docs/modules/develop/pages/api/reference/errors/permission_not_set.adoc +46 -0
- data/docs/modules/develop/pages/api/reference/errors/recursion_limit_exceeded_error.adoc +19 -0
- data/docs/modules/develop/pages/api/reference/errors/too_many_aliases_error.adoc +23 -0
- data/docs/modules/develop/pages/api/reference/errors/unauthorized_field.adoc +30 -0
- data/docs/modules/develop/pages/api/reference/errors/unauthorized_mutation.adoc +30 -0
- data/docs/modules/develop/pages/api/reference/errors/unauthorized_object.adoc +30 -0
- data/docs/modules/develop/pages/api/reference/errors/validation_error.adoc +30 -0
- data/docs/modules/develop/pages/api/reference/errors.adoc +29 -0
- data/docs/modules/develop/pages/backports.adoc +100 -19
- data/docs/modules/develop/pages/c4_component.adoc +0 -3
- data/docs/modules/develop/pages/classes/models.adoc +0 -1
- data/docs/modules/develop/pages/components.adoc +67 -1
- data/docs/modules/develop/pages/machine_translations.adoc +1 -1
- data/docs/modules/develop/pages/maintainers/releases.adoc +34 -21
- data/docs/modules/develop/pages/maintainers/security.adoc +15 -1
- data/docs/modules/develop/partials/api/decidim_version.adoc +102 -0
- data/docs/modules/install/pages/manual.adoc +4 -3
- data/docs/modules/install/pages/update.adoc +7 -24
- data/docs/modules/install/partials/version_matrix.adoc +4 -8
- data/docs/modules/services/pages/activestorage.adoc +40 -0
- data/docs/modules/services/pages/aitools.adoc +0 -1
- data/docs/modules/services/pages/index.adoc +1 -0
- data/docs/modules/services/pages/machine_translation.adoc +139 -2
- data/docs/modules/services/pages/maps.adoc +42 -0
- data/lib/decidim/gem_manager.rb +16 -2
- data/lib/decidim/version.rb +1 -1
- data/lib/decidim.rb +0 -1
- data/package-lock.json +21945 -12726
- data/package.json +5 -4
- data/packages/browserslist-config/package.json +1 -1
- data/packages/core/package.json +28 -28
- 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 +12 -12
- data/packages/webpacker/src/override-config.js +1 -1
- metadata +73 -58
- data/docs/modules/develop/pages/api.adoc +0 -21
|
@@ -38,7 +38,6 @@ Container_Boundary(web_app, "Web Application") {
|
|
|
38
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.")
|
|
39
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.")
|
|
40
40
|
Component(surveys, "Surveys module", "Ruby On Rails Engine", "Component. Makes possible to publish surveys (for registered participants or visitors users).")
|
|
41
|
-
Component(sortitions, "Sortitions module", "Ruby On Rails Engine", "Component. makes possible to select randomly a number of proposals among a set of proposals (or a category of proposals within a set) maximizing guarantees of randomness and avoiding manipulation of results by the administrator.")
|
|
42
41
|
|
|
43
42
|
Rel(surveys, forms, "Consumes")
|
|
44
43
|
Rel(meetings, forms, "Consumes")
|
|
@@ -50,7 +49,6 @@ Container_Boundary(web_app, "Web Application") {
|
|
|
50
49
|
' Rel(initiatives, comments, "Consumes")
|
|
51
50
|
' Rel(accountability, comments, "Consumes")
|
|
52
51
|
' Rel(budgets, comments, "Consumes")
|
|
53
|
-
' Rel(sortitions, comments, "Consumes")
|
|
54
52
|
' Rel(dev, comments, "Consumes")
|
|
55
53
|
' Rel(meetings, comments, "Consumes")
|
|
56
54
|
' Rel(debates, comments, "Consumes")
|
|
@@ -60,7 +58,6 @@ Container_Boundary(web_app, "Web Application") {
|
|
|
60
58
|
' Rel(initiatives, admin, "Managed in")
|
|
61
59
|
' Rel(accountability, admin, "Managed in")
|
|
62
60
|
' Rel(budgets, admin, "Managed in")
|
|
63
|
-
' Rel(sortitions, admin, "Managed in")
|
|
64
61
|
' Rel(meetings, admin, "Managed in")
|
|
65
62
|
' Rel(debates, admin, "Managed in")
|
|
66
63
|
' Rel(proposals, admin, "Managed in")
|
|
@@ -87,7 +87,6 @@ Most commonly used concerns are:
|
|
|
87
87
|
- `Decidim::Forms::HasQuestionnaire`
|
|
88
88
|
- `Decidim::Initiatives::HasArea`
|
|
89
89
|
- `Decidim::Initiatives::InitiativeSlug`
|
|
90
|
-
- `Decidim::Proposals::CommentableCollaborativeDraft`
|
|
91
90
|
- `Decidim::Proposals::CommentableProposal`
|
|
92
91
|
- `Decidim::Proposals::ParticipatoryTextSection`
|
|
93
92
|
- `Decidim::Proposals::Evaluable`
|
|
@@ -47,7 +47,7 @@ Decidim.register_component(:my_component) do |component|
|
|
|
47
47
|
# along with its hooks, so you can decide to halt the transaction by raising
|
|
48
48
|
# an exception.
|
|
49
49
|
#
|
|
50
|
-
#
|
|
50
|
+
# Please refer to the section below to understand the component hooks
|
|
51
51
|
component.on(:create) do |component|
|
|
52
52
|
MyComponent::DoSomething.with(component)
|
|
53
53
|
end
|
|
@@ -154,6 +154,72 @@ Each setting should have one or more translation texts related for the admin zon
|
|
|
154
154
|
* `decidim.components.[component_name].settings.[global|step].[attribute_name]_help`: Additional text with help for the setting use.
|
|
155
155
|
* `decidim.components.[component_name].settings.[global|step].[attribute_name]_readonly`: Additional text for the setting when it is readonly.
|
|
156
156
|
|
|
157
|
+
|
|
158
|
+
== Life Cycle
|
|
159
|
+
|
|
160
|
+
The following hooks are being fired when an action is being done in the admin web interface:
|
|
161
|
+
|
|
162
|
+
- `:create` - A new component is being created
|
|
163
|
+
- `:publish` - A component is being published
|
|
164
|
+
- `:unpublish` - A component is being unpublished
|
|
165
|
+
- `:update` - A component is being updated
|
|
166
|
+
- `:permission_update` - The component permissions are being changed
|
|
167
|
+
- `:duplicate` - A component is being copied
|
|
168
|
+
|
|
169
|
+
[source,ruby]
|
|
170
|
+
----
|
|
171
|
+
# :my_component is the unique name of the component that will be globally registered.
|
|
172
|
+
Decidim.register_component(:my_component) do |my_component|
|
|
173
|
+
my_component.on(:create) do |component|
|
|
174
|
+
# In the officially provided libraries we are using this hook to create additional required resources, like the default proposal states.
|
|
175
|
+
MyComponent::DoSomething.with(component)
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
my_component.on(:publish) do |component|
|
|
179
|
+
# In the officially provided libraries we are using this hook to add items to the search index
|
|
180
|
+
MyComponent::DoSomething.with(component)
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
my_component.on(:unpublish) do |component|
|
|
184
|
+
# In the officially provided libraries we are using this hook to remove items from the search index
|
|
185
|
+
MyComponent::DoSomething.with(component)
|
|
186
|
+
end
|
|
187
|
+
my_component.on(:update) do |component|
|
|
188
|
+
MyComponent::DoSomething.with(component)
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
my_component.on(:permission_update) do |component|
|
|
192
|
+
MyComponent::DoSomething.with(component)
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
my_component.on(:duplicate) do |new_component, old_component|
|
|
196
|
+
MyComponent::DoSomething.with(new_component)
|
|
197
|
+
MyComponent::DoSomethingElse.with(old_component)
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
----
|
|
201
|
+
|
|
202
|
+
In some cases, you could define your own component hooks like the following:
|
|
203
|
+
|
|
204
|
+
[source,ruby]
|
|
205
|
+
----
|
|
206
|
+
# :my_component is the unique name of the component that will be globally registered.
|
|
207
|
+
Decidim.register_component(:my_component) do |my_component|
|
|
208
|
+
my_component.on(:my_action) do |params|
|
|
209
|
+
MyComponent::DoSomething.with_the(params)
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
----
|
|
213
|
+
|
|
214
|
+
Then you could call it in your codebase as the following:
|
|
215
|
+
|
|
216
|
+
[source,ruby]
|
|
217
|
+
----
|
|
218
|
+
# ... Some code that you may have
|
|
219
|
+
@my_resource.component.run_hooks(:my_action, params)
|
|
220
|
+
# ... Some other code you may need
|
|
221
|
+
----
|
|
222
|
+
|
|
157
223
|
== Fixtures
|
|
158
224
|
|
|
159
225
|
This sections explains how to add dummy content to a development application.
|
|
@@ -42,7 +42,7 @@ config.machine_translation_service = "MyApp::MyOwnTranslationService"
|
|
|
42
42
|
config.machine_translation_delay = 0.seconds
|
|
43
43
|
----
|
|
44
44
|
|
|
45
|
-
The class will need to be implemented, or reuse one from the community. Check the docs on how to implement a machine translation service.
|
|
45
|
+
The class will need to be implemented, or reuse one from the community. Check the docs on xref:services:machine_translations.adoc[how to implement a machine translation service].
|
|
46
46
|
|
|
47
47
|
== Enabling the integration, organization-wise
|
|
48
48
|
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
= Releasing new versions
|
|
2
2
|
|
|
3
|
-
In order to release new version you need to
|
|
3
|
+
In order to release new version you need to:
|
|
4
|
+
|
|
5
|
+
. be owner of all the gems at RubyGems, ask one of the owners to add you before releasing. Try `gem owner decidim` to find out the owners of the gem. It is worth making sure you are owner of all gems.
|
|
6
|
+
. be owner of all the NPM packages. You also need to be authenticated with `npm login`.
|
|
7
|
+
. have the `gh` command line installed. You can install by following the https://github.com/cli/cli/blob/trunk/docs/install_linux.md[GH installation instructions]. You also need to be authenticated with `gh auth login`.
|
|
8
|
+
. have the `yq` command line installed. You can install it with `snap install yq` in Ubuntu.
|
|
9
|
+
. have the `decidim-maintainers_toolbox` gem. You can install it with `gem install decidim-maintainers_toolbox`.
|
|
10
|
+
|
|
11
|
+
Before you begin the release process, make sure you check if there are any open or pending backports. Currently, is not mandatory to open or merge all the backports, but is something that we usually aim for. Refer to the xref:develop:backports.adoc[backports] page for more information.
|
|
4
12
|
|
|
5
13
|
== Release Candidates
|
|
6
14
|
|
|
@@ -9,26 +17,31 @@ They should be ready to go to production, but publicly released just before in o
|
|
|
9
17
|
|
|
10
18
|
If this is a *Release Candidate version* release, the steps to follow are:
|
|
11
19
|
|
|
12
|
-
. Merge all the https://github.com/decidim/decidim/pulls?q=is%3Apr+is%3Aopen+author%3Adecidim-bot+sort%3Aupdated-desc[Crowdin pull requests created by the user `decidim-bot`], specially the one that is going to be
|
|
20
|
+
. Merge all the https://github.com/decidim/decidim/pulls?q=is%3Apr+is%3Aopen+author%3Adecidim-bot+sort%3Aupdated-desc[Crowdin pull requests created by the user `decidim-bot`], specially the one that is going to be merged against the release branch `release/x.y-stable` that should be returned by the provided example search (pick the correct pull request for the release from the results).
|
|
13
21
|
. Go to develop with `git checkout develop`
|
|
14
22
|
. Install the last version of the `decidim-maintainers_toolbox` gem, and run the releaser command. Mind that for this to work you need locally the gh CLI from GitHub.
|
|
15
23
|
[source,bash]
|
|
16
24
|
----
|
|
17
25
|
gem install decidim-maintainers_toolbox
|
|
18
|
-
decidim-releaser --github-token
|
|
26
|
+
decidim-releaser --github-token=$(gh auth token) --version-type=rc
|
|
19
27
|
----
|
|
20
28
|
. This will create the stable branch and also create two Pull Requests:
|
|
21
29
|
.. One for changing the development version on the `develop` branch (with title "Bump develop to next release version (x.y.z)")
|
|
22
|
-
.. Another for creating the
|
|
30
|
+
.. Another for creating the new release in the stable branch with title `Bump to vx.y.z version`. Wait for the tests to finish and check that everything is passing before releasing the version.
|
|
23
31
|
During this process you will have the instructions on how to follow with the process in the command line. One of the tasks is updating Crowdin, you can read more about this in the "Create the stable branch in Crowdin" section of this page.
|
|
24
32
|
. Review, accept and merge the Pull Request.
|
|
25
33
|
. Run `git pull && bin/rake release_all`, this will create all the tags, push the commits and tags and release the gems to RubyGems. Be ready for the One Time Password fill for each of the gems.
|
|
34
|
+
. Once all the gems are published:
|
|
35
|
+
.. Re-run the failed generators tests at the release branch.
|
|
36
|
+
.. Always check if there are any pending security CVEs that need to be published. If there are, then follow the instructions in the xref:develop:maintainers/security.adoc[Security] page.
|
|
37
|
+
.. Create a new release at this repository, just go to the https://github.com/decidim/decidim/releases[releases page] and create a new one.
|
|
26
38
|
|
|
27
39
|
Usually, at this point, the release branch is deployed to Metadecidim during, at least, one week to validate the stability of the version.
|
|
28
40
|
|
|
29
41
|
=== During the validation period
|
|
30
42
|
|
|
31
|
-
. During the validation period, bugfixes must be implemented directly to the current `
|
|
43
|
+
. During the validation period, bugfixes must be implemented directly to the current `develop` branch, and if you need to backport, just add the labels `type: fix` and also the `release: v0.xx` to allow automated backports.
|
|
44
|
+
... In special cases only (when the feature aimed to be fixed does not exist anymore in `develop`), you can open the Pull Request directly against the release branch. This is something that we usually defer to doing, as it could bring inconsistencies between the versions, making the maintenance harder.
|
|
32
45
|
. During the validation period, translations to the officially supported languages must be added to Crowdin and, when completed, merged into `release/x.y.z-stable`.
|
|
33
46
|
|
|
34
47
|
== Major/Minor versions
|
|
@@ -37,20 +50,19 @@ Release Candidates will be tested in a production server (usually Metadecidim) d
|
|
|
37
50
|
|
|
38
51
|
. Merge all the https://github.com/decidim/decidim/pulls?q=is%3Apr+is%3Aopen+author%3Adecidim-bot+sort%3Aupdated-desc[Crowdin pull requests created by the user `decidim-bot`], specially the one that is going to be marged against the release branch `release/x.y-stable` that should be returned by the provided example search (pick the correct pull request for the release from the results).
|
|
39
52
|
. Checkout the release stable branch `git checkout release/x.y-stable`.
|
|
40
|
-
.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Add the header with the current version and link like `+## [0.20.0](https://github.com/decidim/decidim/tree/v0.20.0)+` and the headers generated by the changelog generator.
|
|
47
|
-
. Commit all the changes: `git add . && git commit -m "Bump to v0.XX.0 final version" && git push origin release/x.y-stable`.
|
|
53
|
+
. Install the last version of the `decidim-maintainers_toolbox` gem, and run the releaser command. Mind that for this to work you need locally the gh CLI from GitHub.
|
|
54
|
+
[source,bash]
|
|
55
|
+
----
|
|
56
|
+
gem install decidim-maintainers_toolbox
|
|
57
|
+
decidim-releaser --github-token=$(gh auth token) --version-type=minor
|
|
58
|
+
----
|
|
48
59
|
. Wait for the tests to finish and check that everything is passing before releasing the version.
|
|
49
60
|
NOTE: When you bump the version, the generator tests will fail because the gems and NPM packages have not been actually published yet (as in sent to rubygems/npm). You may see errors such as `No matching version found for @decidim/browserslist-config@~0.xx.y` in the CI logs. This should be fine as long as you have ensured that the generators tests passed in the previous commit.
|
|
50
|
-
. Run `git pull && bin/rake release_all`, this will create all the tags, push the commits and tags and release the gems to RubyGems.
|
|
61
|
+
. Run `git pull && bin/rake release_all`, this will create all the tags, push the commits and tags and release the gems to RubyGems. Be ready for the One Time Password fill for each of the gems.
|
|
51
62
|
. Once all the gems are published:
|
|
52
|
-
|
|
53
|
-
|
|
63
|
+
.. Re-run the failed generators tests at the release branch.
|
|
64
|
+
.. Always check if there are any pending security CVEs that needs to be published. If there are, then follow the instructions in the xref:develop:maintainers/security.adoc[Security] page.
|
|
65
|
+
.. Create a new release at this repository, just go to the https://github.com/decidim/decidim/releases[releases page] and create a new one.
|
|
54
66
|
. Update Decidim's Docker repository as explained in the Docker images section below.
|
|
55
67
|
. Update Crowdin synchronization configuration with GitHub:
|
|
56
68
|
.. Add the new `release/x.y-stable` branch.
|
|
@@ -96,22 +108,23 @@ After you commit this change in `develop` branch you will have to wait a couple
|
|
|
96
108
|
Releasing new versions from a *_release/x.y-stable_* branch is quite easy.
|
|
97
109
|
The process is very similar from releasing a new Decidim version:
|
|
98
110
|
|
|
99
|
-
. Merge all the https://github.com/decidim/decidim/pulls?q=is%3Apr+is%3Aopen+author%3Adecidim-bot+sort%3Aupdated-desc[Crowdin pull requests created by the user `decidim-bot`], specially the one that is going to be
|
|
111
|
+
. Merge all the https://github.com/decidim/decidim/pulls?q=is%3Apr+is%3Aopen+author%3Adecidim-bot+sort%3Aupdated-desc[Crowdin pull requests created by the user `decidim-bot`], specially the one that is going to be merged against the release branch `release/x.y-stable` that should be returned by the provided example search (pick the correct pull request for the release from the results).
|
|
100
112
|
. Make sure that there are no more PRs to backport. Learn more about xref:develop:backports.adoc[Backports].
|
|
101
|
-
. Checkout the branch you want to release: `git checkout -
|
|
113
|
+
. Checkout the branch you want to release: `git checkout release/x.y-stable && git pull origin release/x.y-stable`
|
|
102
114
|
. Install the last version of the `decidim-maintainers_toolbox` gem, and run the releaser command. Mind that for this to work you need locally the gh CLI from GitHub.
|
|
103
115
|
[source,bash]
|
|
104
116
|
----
|
|
105
117
|
gem install decidim-maintainers_toolbox
|
|
106
|
-
decidim-releaser --github-token
|
|
118
|
+
decidim-releaser --github-token=$(gh auth token) --version-type=patch
|
|
107
119
|
----
|
|
108
120
|
. This will create a Pull Request for the new release with title `Bump to vx.y.z version`. Wait for the tests to finish and check that everything is passing before releasing the version.
|
|
109
121
|
NOTE: When you bump the version, the generator tests will fail because the gems and NPM packages have not been actually published yet (as in sent to rubygems/npm). You may see errors such as `No matching version found for @decidim/browserslist-config@~0.xx.y` in the CI logs. This should be fine as long as you have ensured that the generators tests passed in the previous commit.
|
|
110
122
|
. Review, accept and merge the Pull Request.
|
|
111
123
|
. Run `git pull && bin/rake release_all`, this will create all the tags, push the commits and tags and release the gems to RubyGems. Be ready for the One Time Password fill for each of the gems.
|
|
112
124
|
. Once all the gems are published:
|
|
113
|
-
|
|
114
|
-
|
|
125
|
+
.. Re-run the failed generators tests at the release branch.
|
|
126
|
+
.. Always check if there are any pending security CVEs that needs to be published. If there are, then follow the instructions in the xref:develop:maintainers/security.adoc[Security] page.
|
|
127
|
+
.. Create a new release at this repository, just go to the https://github.com/decidim/decidim/releases[releases page] and create a new one.
|
|
115
128
|
. Update Decidim's Docker repository as explained in the Docker images section.
|
|
116
129
|
|
|
117
130
|
== Docker images for each release
|
|
@@ -7,14 +7,19 @@ This page provides an overview of the security procedures followed by the Mainta
|
|
|
7
7
|
.. an explanation of the issue, without giving much details about the vulnerability.
|
|
8
8
|
.. the metadata necessary, such as affected releases and severity.
|
|
9
9
|
.. we will not give a step by step explanation on how to exploit the vulnerability.
|
|
10
|
+
.. internally, we leave the instructions for other Maintainers in the comments of the Security Advisory (so it is reproducible, both the bug and the fix when there is any).
|
|
10
11
|
. The issue will be handled privately (on a private fork) until a fix is ready.
|
|
11
12
|
. Once the fix is ready, we will open a PR to the `develop` branch with the fix.
|
|
12
13
|
. We will do the backports to the https://github.com/decidim/decidim/blob/develop/SECURITY.md[supported versions].
|
|
13
14
|
. We will release a new version with the fix.
|
|
14
15
|
. On the Release Notes of the versions with the fix, we will add a note about the vulnerability with a reference to the CVE or the GitHub Security Advisory ID if there is not any ID. See below the `Template for the Release Notes`.
|
|
15
|
-
. We will send a notification to the Decidim Devs Matrix chat room. We will not mention the vulnerability, just that there is a new version with a security fix. See below the `Template for the Decidim Devs chat room message
|
|
16
|
+
. We will send a notification to the Decidim Devs Matrix chat room. We will not mention the vulnerability, just that there is a new version with a security fix. See below the `Template for the Decidim Devs chat room message`.
|
|
16
17
|
. We will wait the grace period (2 or 4 months depending on the severity) before disclosing the vulnerability.
|
|
18
|
+
. We will add a comment for other Maintainers to keep track of when the Security Advisory will be published. See below the `Template for the Security Advisory messages`.
|
|
19
|
+
. We will update the metadata of the Security Advisory with the versions that have this fix (the "Patched versions" in GitHub UI).
|
|
20
|
+
. We will add to the Internal Decidim calendar the date when the Security Advisory will be published.
|
|
17
21
|
. After the grace period, we will publish the Security Advisory.
|
|
22
|
+
. Once the Security Advisory is published, then the release note message is updated with the link to the published page.
|
|
18
23
|
|
|
19
24
|
== Template for the Release Notes
|
|
20
25
|
|
|
@@ -50,3 +55,12 @@ XXX
|
|
|
50
55
|
[1] https://github.com/decidim/decidim/releases/tag/v0.XXX.XXX
|
|
51
56
|
[2] https://github.com/decidim/decidim/blob/develop/SECURITY.md
|
|
52
57
|
----
|
|
58
|
+
|
|
59
|
+
== Template for the Security Advisory messages
|
|
60
|
+
|
|
61
|
+
[source,markdown]
|
|
62
|
+
----
|
|
63
|
+
Two versions with the fix have been published today: v0.XXX.XXX and v0.XXX.XXX.
|
|
64
|
+
|
|
65
|
+
This security vulnerability will be published on XXX according to our security policy.
|
|
66
|
+
----
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
|
|
2
|
+
++++
|
|
3
|
+
<div class="tabs" data-tab-group="language">
|
|
4
|
+
<div class="tabs-nav">
|
|
5
|
+
<button class="tabs-nav__button is-active" data-tab="curl">cURL</button>
|
|
6
|
+
<button class="tabs-nav__button" data-tab="javascript">JavaScript</button>
|
|
7
|
+
<button class="tabs-nav__button" data-tab="python">Python</button>
|
|
8
|
+
<button class="tabs-nav__button" data-tab="ruby">Ruby</button>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="tabs-content">
|
|
11
|
+
<div class="tabs-content__panel is-active" data-tab="curl">
|
|
12
|
+
++++
|
|
13
|
+
|
|
14
|
+
[source,bash]
|
|
15
|
+
----
|
|
16
|
+
curl -sSH "Content-Type: application/json" \
|
|
17
|
+
-d '{"query": "{ decidim { version } }"}' \
|
|
18
|
+
https://www.decidim.barcelona/api/
|
|
19
|
+
----
|
|
20
|
+
|
|
21
|
+
++++
|
|
22
|
+
</div>
|
|
23
|
+
<div class="tabs-content__panel" data-tab="javascript">
|
|
24
|
+
++++
|
|
25
|
+
|
|
26
|
+
[source,javascript]
|
|
27
|
+
----
|
|
28
|
+
const url = "https://www.decidim.barcelona/api/";
|
|
29
|
+
const query = "{ decidim { version } }";
|
|
30
|
+
|
|
31
|
+
fetch(url, {
|
|
32
|
+
method: "POST",
|
|
33
|
+
headers: {
|
|
34
|
+
"Content-Type": "application/json",
|
|
35
|
+
},
|
|
36
|
+
body: JSON.stringify({ query }),
|
|
37
|
+
})
|
|
38
|
+
.then((response) => response.json())
|
|
39
|
+
.then((data) => {
|
|
40
|
+
console.log(data);
|
|
41
|
+
})
|
|
42
|
+
.catch((error) => {
|
|
43
|
+
console.error(error);
|
|
44
|
+
});
|
|
45
|
+
----
|
|
46
|
+
|
|
47
|
+
++++
|
|
48
|
+
</div>
|
|
49
|
+
<div class="tabs-content__panel" data-tab="python">
|
|
50
|
+
++++
|
|
51
|
+
|
|
52
|
+
[source,python]
|
|
53
|
+
----
|
|
54
|
+
import requests
|
|
55
|
+
|
|
56
|
+
url = "https://www.decidim.barcelona/api/"
|
|
57
|
+
query = "{ decidim { version } }"
|
|
58
|
+
|
|
59
|
+
headers = {
|
|
60
|
+
"Content-Type": "application/json"
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
response = requests.post(
|
|
64
|
+
url,
|
|
65
|
+
json={"query": query},
|
|
66
|
+
headers=headers
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
print(response.json())
|
|
70
|
+
----
|
|
71
|
+
|
|
72
|
+
++++
|
|
73
|
+
</div>
|
|
74
|
+
<div class="tabs-content__panel" data-tab="ruby">
|
|
75
|
+
++++
|
|
76
|
+
|
|
77
|
+
[source,ruby]
|
|
78
|
+
----
|
|
79
|
+
require "net/http"
|
|
80
|
+
require "uri"
|
|
81
|
+
require "json"
|
|
82
|
+
|
|
83
|
+
uri = URI.parse("https://www.decidim.barcelona/api/")
|
|
84
|
+
|
|
85
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
|
86
|
+
http.use_ssl = true
|
|
87
|
+
|
|
88
|
+
request = Net::HTTP::Post.new(uri.request_uri)
|
|
89
|
+
request["Content-Type"] = "application/json"
|
|
90
|
+
request.body = {
|
|
91
|
+
query: "{ decidim { version } }"
|
|
92
|
+
}.to_json
|
|
93
|
+
|
|
94
|
+
response = http.request(request)
|
|
95
|
+
puts JSON.parse(response.body)
|
|
96
|
+
----
|
|
97
|
+
|
|
98
|
+
++++
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
++++
|
|
@@ -8,6 +8,7 @@ In order to develop on decidim, you will need:
|
|
|
8
8
|
* *NodeJS* 22.14.x
|
|
9
9
|
* *Npm* 10.9.x
|
|
10
10
|
* *ImageMagick*
|
|
11
|
+
* *LibVips*
|
|
11
12
|
* *Chrome* browser and https://sites.google.com/a/chromium.org/chromedriver/[chromedriver] (if you need to run specs/tests)
|
|
12
13
|
|
|
13
14
|
The compatibility between the different versions of the components is the following:
|
|
@@ -57,7 +58,7 @@ An important component for Decidim is Node.js and Yarn. With this commands you w
|
|
|
57
58
|
----
|
|
58
59
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
|
|
59
60
|
source "$HOME/.nvm/nvm.sh"
|
|
60
|
-
nvm install
|
|
61
|
+
nvm install 22
|
|
61
62
|
npm install -g yarn
|
|
62
63
|
----
|
|
63
64
|
|
|
@@ -67,7 +68,7 @@ Next, we need to install the `decidim` gem with its dependencies:
|
|
|
67
68
|
|
|
68
69
|
[source,bash]
|
|
69
70
|
----
|
|
70
|
-
sudo apt install -y libicu-dev imagemagick
|
|
71
|
+
sudo apt install -y libicu-dev imagemagick libvips libvips-tools
|
|
71
72
|
gem install decidim
|
|
72
73
|
----
|
|
73
74
|
|
|
@@ -158,5 +159,5 @@ The seed data will not be created in production environments, if you still want
|
|
|
158
159
|
|
|
159
160
|
[source,bash]
|
|
160
161
|
----
|
|
161
|
-
SEED=true rails assets:precompile db:seed
|
|
162
|
+
SEED=true bin/rails assets:precompile db:seed
|
|
162
163
|
----
|
|
@@ -6,34 +6,16 @@ To keep our system up to date, we can visit the page https://github.com/decidim/
|
|
|
6
6
|
|
|
7
7
|
[source,ruby]
|
|
8
8
|
----
|
|
9
|
-
gem "decidim", "0.
|
|
10
|
-
gem "decidim-conferences", "0.
|
|
11
|
-
gem "decidim-initiatives", "0.
|
|
9
|
+
gem "decidim", "0.29.0"
|
|
10
|
+
gem "decidim-conferences", "0.29.0"
|
|
11
|
+
gem "decidim-initiatives", "0.29.0"
|
|
12
12
|
|
|
13
|
-
gem "decidim-dev", "0.
|
|
13
|
+
gem "decidim-dev", "0.29.0"
|
|
14
14
|
----
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
To update, we recommend using small increments. From time to time we change the Ruby version or update dependencies, and skipping multiple versions at once can introduce breaking changes. Therefore, if you need to upgrade from v0.29.0 to v0.31.0, we recommend to first upgrade to v0.30.0, follow the release notes, and then, from v0.30.0 to upgrade to v0.31.0.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
[source,ruby]
|
|
21
|
-
----
|
|
22
|
-
gem "decidim", "0.21"
|
|
23
|
-
gem "decidim-conferences", "0.21"
|
|
24
|
-
gem "decidim-initiatives", "0.21"
|
|
25
|
-
|
|
26
|
-
gem "decidim-dev", "0.21"
|
|
27
|
-
----
|
|
28
|
-
|
|
29
|
-
After doing that, you need to execute these commands:
|
|
30
|
-
|
|
31
|
-
[source,console]
|
|
32
|
-
----
|
|
33
|
-
bundle update decidim
|
|
34
|
-
bin/rails decidim:upgrade
|
|
35
|
-
bin/rails db:migrate
|
|
36
|
-
----
|
|
18
|
+
So, to perform the upgrade, we first follow the https://github.com/decidim/decidim/releases/tag/v0.30.0[release notes for v0.30.0], then, after we confirmed everything went OK, we should follow the https://github.com/decidim/decidim/releases/tag/v0.31.0[release notes for v0.31.0].
|
|
37
19
|
|
|
38
20
|
In theory, that would be all. However, you need to be careful in certain situations, specially if your copy of Decidim has many code modifications. We'd recommend to always test the upgrade following Ruby on Rails best practices: working with development mode in localhost, deploying to a staging/preproduction server to test it manually (specially your modifications) and finally deploying to production. As an alternative you can test the upgrade in a separate machine with the same configuration (If using DigitalOcean you can create an snapshot of the server, tested the update, and then remove it, similar process on other providers).
|
|
39
21
|
|
|
@@ -88,6 +70,7 @@ include::install:partial$version_matrix.adoc[]
|
|
|
88
70
|
== Recommendations
|
|
89
71
|
|
|
90
72
|
. Make a full backup of the database before updating, just in case something unexpected happens.
|
|
73
|
+
. Never add 2 or more versions of Decidim to the same deployment to production, as the database structure could change, deprecated functions could be removed, causing issues that may prevent you to successfully run post release commands.
|
|
91
74
|
. If you are more than update away. Always update from one version to the immediately next one and then repeat the process until you are up to date.
|
|
92
75
|
. Always check the instructions for a certain version upgrade in https://github.com/decidim/decidim/releases[Releases]. Some releases require to perform certain actions as they may change some database structures. Follow that instructions if you are affected.
|
|
93
76
|
. Check also the file https://github.com/decidim/decidim/blob/develop/CHANGELOG.md[CHANGELOG] It may have relevant information for updates between versions.
|
|
@@ -2,16 +2,12 @@
|
|
|
2
2
|
|===
|
|
3
3
|
|Decidim version |Ruby version |Node version | Status
|
|
4
4
|
|
|
5
|
-
|develop | 3.
|
|
5
|
+
|develop | 3.4.7 | 22.14.x | Unreleased
|
|
6
6
|
|
|
7
|
-
|v0.
|
|
8
|
-
|
|
9
|
-
|v0.29 | 3.2.2 | 18.17.x | Bug fixes and security updates
|
|
7
|
+
|v0.31 | 3.3.4 | 22.14.x | Bug fixes and security updates
|
|
10
8
|
|
|
11
|
-
|v0.
|
|
12
|
-
|
|
13
|
-
|v0.27 | 3.0.2 | 16.18.x | Security updates
|
|
9
|
+
|v0.30 | 3.3.4 | 18.17.x | Bug fixes and security updates
|
|
14
10
|
|
|
15
|
-
|v0.
|
|
11
|
+
|v0.29 | 3.2.2 | 18.17.x | Not maintained
|
|
16
12
|
|
|
17
13
|
|===
|
|
@@ -47,6 +47,46 @@ Locate the bucket, go into the "Permissions" tab and find the section titled "CO
|
|
|
47
47
|
|
|
48
48
|
Read more at https://docs.aws.amazon.com/AmazonS3/latest/userguide/cors.html[Amazon S3 CORS documentation].
|
|
49
49
|
|
|
50
|
+
==== Public assets
|
|
51
|
+
|
|
52
|
+
To have public assets in your application, so that you do not rely on the ActiveStorage redirect system, you need to configure your bucket as follows:
|
|
53
|
+
|
|
54
|
+
1. Go to your AWS S3 console
|
|
55
|
+
2. Select the bucket you are using for uploads
|
|
56
|
+
3. Open the *Permissions* tab
|
|
57
|
+
4. In the *Block public access* section, click *Edit*
|
|
58
|
+
5. Disable all blocking options by *unchecking* every box:
|
|
59
|
+
- "Block all public access"
|
|
60
|
+
- "Block public access to buckets and objects granted through new access control lists (ACLs)"
|
|
61
|
+
- "Block public access to buckets and objects granted through any access control lists (ACLs)"
|
|
62
|
+
- "Block public access to buckets and objects granted through new public bucket or access point policies"
|
|
63
|
+
- "Block public and cross-account access to buckets and objects through any public bucket or access point policies"
|
|
64
|
+
6. Click *Save changes*
|
|
65
|
+
7. Still in the *Permissions tab*, locate the *Bucket policy section* and click *Edit*.
|
|
66
|
+
8. Add a bucket policy similar to the example below.
|
|
67
|
+
- If you are unsure of your bucket’s ARN, you can find it in the Properties tab. For this example, we use `arn:aws:s3:::your-bucket-name`
|
|
68
|
+
9. Click *Save changes*
|
|
69
|
+
[source,json]
|
|
70
|
+
----
|
|
71
|
+
{
|
|
72
|
+
"Version": "2012-10-17",
|
|
73
|
+
"Statement": [
|
|
74
|
+
{
|
|
75
|
+
"Sid": "Statement1",
|
|
76
|
+
"Effect": "Allow",
|
|
77
|
+
"Principal": "*",
|
|
78
|
+
"Action": "s3:GetObject",
|
|
79
|
+
"Resource": "arn:aws:s3:::your-bucket-name/*"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
----
|
|
84
|
+
|
|
85
|
+
[NOTE]
|
|
86
|
+
====
|
|
87
|
+
If you use any other provider than the default (`local`) you will need to also configure the xref:customize:content_security_policy.adoc[Content security policy]. For the directives "img-src", "media-src", and "connect-src" adding some additional content like https://$YOUR-BUCKET-NAME.s3.$YOUR-AWS-REGION.amazonaws.com/* (should look like: https://your-bucket-name.s3.eu-west-1.amazonaws.com)
|
|
88
|
+
====
|
|
89
|
+
|
|
50
90
|
=== Google Cloud Storage
|
|
51
91
|
|
|
52
92
|
Google Cloud Storage requires you to use the `gsutil` command line tool to set the CORS policy on your bucket. First you need to know the name of your bucket and then use the following command (replace `your-bucket-name` with the actual name of the bucket):
|
|
@@ -71,7 +71,6 @@ Decidim::Ai::SpamDetection.resource_models = {
|
|
|
71
71
|
"Decidim::Debates::Debate" => "Decidim::Ai::SpamDetection::Resource::Debate",
|
|
72
72
|
"Decidim::Meetings::Meeting" => "Decidim::Ai::SpamDetection::Resource::Meeting",
|
|
73
73
|
"Decidim::Proposals::Proposal" => "Decidim::Ai::SpamDetection::Resource::Proposal",
|
|
74
|
-
"Decidim::Proposals::CollaborativeDraft" => "Decidim::Ai::SpamDetection::Resource::CollaborativeDraft",
|
|
75
74
|
"Decidim::User" => "Decidim::Ai::SpamDetection::Resource::UserBaseEntity"
|
|
76
75
|
}
|
|
77
76
|
|
|
@@ -6,6 +6,7 @@ There are multiple services that can be enabled in a Decidim installation. It is
|
|
|
6
6
|
* xref:services:activestorage.adoc[Active Storage]
|
|
7
7
|
* xref:services:aitools.adoc[AI tools]
|
|
8
8
|
* xref:services:etherpad.adoc[Etherpad]
|
|
9
|
+
* xref:services:machine_translation.adoc[Machine Translation]
|
|
9
10
|
* xref:services:maps.adoc[Maps]
|
|
10
11
|
* xref:services:sms.adoc[SMS]
|
|
11
12
|
* xref:services:smtp.adoc[SMTP]
|