decidim 0.13.1 → 0.14.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45f9405b4118ab9844145b8795e64cf50099e03fce46e9872a5685a05ba2a7a6
4
- data.tar.gz: 9bce04d41188708a4d62cf71b7a8cbc8ebcf4f6d79519aa4df44274adf402410
3
+ metadata.gz: 44a857cfee35b3598af004c5ca54af2405fd710b8369292dc097ee6ddac34c58
4
+ data.tar.gz: ae8bb4bab8834aba538fcba815ae9b98b3e0c811c7a134707379ec5766f2a1dd
5
5
  SHA512:
6
- metadata.gz: a72e3a89834e43c86e723d922af5a49124e6b8e7c035da335469bd93e1d2264933fa8434704a0006ba4fec858e4a14c9349f309925cb0ec2d527c67d1f41d139
7
- data.tar.gz: c12985ae949ca495634cf136f0cccd04131b091945b1ede1ff48430774bb16ee33adfdc7f20df2037009b72a265f41fec844098cd1e3698d57955e8e258e285c
6
+ metadata.gz: 78faa8c96fb1aefbd9e766bdb1b5bc2e9e4c3ff1680e2b809616943bd0d3560b6b553d3bdbb39f4d1d829d52ae936b70939c23dd820413724d6f7fbd931ab4df
7
+ data.tar.gz: ffe4b1a00776906461dc74645931af3fff72fbcef080b3532a8149075be4c428285352d351d53833e3d4b8fecc47784d24a59e6a1af30ce57fe9300a8a641dae
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  The participatory democracy framework.
4
4
 
5
- > Democracy never felt so real.
5
+ > Free Open-Source participatory democracy, citizen participation and open government for cities and organizations
6
6
 
7
7
  [Decidim](https://decidim.org) is a participatory democracy framework, written in Ruby on Rails, originally developed for the Barcelona City government online and offline participation website. Installing these libraries will provide you a generator and gems to help you develop web applications like the ones found on [example applications](#example-applications) or like [our demo application](http://staging.decidim.codegram.com).
8
8
 
@@ -20,7 +20,6 @@ Code quality
20
20
 
21
21
  [![Build Status](https://img.shields.io/circleci/project/github/decidim/decidim/master.svg)](https://circleci.com/gh/decidim/decidim)
22
22
  [![Maintainability](https://api.codeclimate.com/v1/badges/ad8fa445086e491486b6/maintainability)](https://codeclimate.com/github/decidim/decidim/maintainability)
23
- [![Dependency Status](https://img.shields.io/gemnasium/decidim/decidim.svg)](https://gemnasium.com/github.com/decidim/decidim)
24
23
  [![Crowdin](https://d322cqt584bo4o.cloudfront.net/decidim/localized.svg)](https://crowdin.com/project/decidim)
25
24
  [![Inline docs](http://inch-ci.org/github/decidim/decidim.svg?branch=master)](http://inch-ci.org/github/decidim/decidim)
26
25
  [![Accessibility issues](https://rocketvalidator.com/badges/a11y_issues.svg?url=http://staging.decidim.codegram.com/)](https://rocketvalidator.com/badges/link?url=http://staging.decidim.codegram.com/&report=a11y)
@@ -0,0 +1,63 @@
1
+ # How to add a new authorizable action?
2
+
3
+ ## Proposals example
4
+
5
+ We're going to reproduce the steps to add an action (endorse) for a proposal step by step.
6
+
7
+ ### Configuring a new 'endorse' action
8
+
9
+ 1. Edit decidim-proposals/lib/decidim/proposals/component.rb
10
+ 1. Add the new 'endorse' action into the `component.actions` array and save the file:
11
+
12
+ ```ruby
13
+ component.actions = %w(endorse vote create)
14
+ ```
15
+
16
+ 1. Translate the action for the corresponding key: `en.decidim.components.proposals.actions.endorse = Endorse`
17
+ 1. Edit `app/permissions/decidim/proposals/permissions.rb` and add the corresponding permission, using `authorized?` method to run the `authorization handler` logic.
18
+ 1. In the endorse proposals controller, enforce that the user has permissions to perform the `endorse` action before actually doing it, using the `enforce_permission_to` method:
19
+
20
+ ```ruby
21
+ enforce_permission_to :endorse, :proposal, proposal: proposal
22
+ ```
23
+
24
+ 1. In the proposals templates, change regular links and buttons to endorse a proposal with calls to `action_authorized_link_to` and `action_authorized_button_to` helpers.
25
+ 1. Restart the server to pick up the changes.
26
+
27
+ ### Using the new 'endorse' action
28
+
29
+ 1. Now an admin user should be able to go to a participatory space with a `proposals` component panel and click on its `Permissions` link (the icon with a key). There, an `authorization handler` can be set for the `endorse` action.
30
+ 1. Go to a Proposal detail in the front-end
31
+ 1. Try to endorse the current proposal
32
+ - If the user has not granted the selected permission, the 'endorse' button should block the action and allow the user to grant the permission with the selected `authorization handler` logic.
33
+ - If the logger user has already granted the selected permission, the user should be able to perform the endorsement.
34
+
35
+ ### Allow to configure the related permissions at resource level
36
+
37
+ Permissions settings could also be set for an specific resources appart from the full component. Actions should also be related to the resource.
38
+
39
+ 1. Edit decidim-proposals/lib/decidim/proposals/component.rb
40
+ 1. Add the 'endorse' action into the `resource.actions` array for the `proposal` resource definition and save the file:
41
+
42
+ ```ruby
43
+ resource.actions = %w(endorse vote)
44
+ ```
45
+
46
+ 1. Only if this is the first resource action added, edit the proposals admin templates and use the `resource_permissions_link` helper to link the resource permissions page from each resource in the listing.
47
+
48
+ ```erb
49
+ <%= resource_permissions_link(proposal) %>
50
+ ```
51
+
52
+ 1. In the proposals permission class, pass an extra `resource` named parameter to the calls to the `authorized?` method.
53
+
54
+ ```ruby
55
+ authorized?(:endorse, resource: proposal)
56
+ ```
57
+
58
+ 1. In the proposals templates, also add the extra `resource` parameter to the `action_authorized_link_to` and `action_authorized_button_to` helpers.
59
+ 1. Restart the server to pick up the changes.
60
+
61
+ ### Using permissions at resource level
62
+
63
+ 1. Now an admin user should be able to go to a participatory space with a `proposals` component panel and click on its `Permissions` link (the icon with a key). There, an `authorization handler` can be set for the `endorse` action.
@@ -0,0 +1,60 @@
1
+ # Content blocks
2
+
3
+ Content blocks come from the need of making sortable and configurable layout chunks. The abstraction is similar to view hooks, but content blocks allow the user to manually configure and sort each block. The order and configuration is backed in the database.
4
+
5
+ As of today, content blocks can be:
6
+
7
+ - Sorted
8
+ - Published
9
+
10
+ Configuration will come in the near future.
11
+
12
+ Content blocks are defined per scope, and must be unique in that scope. Examples of scopes could be `:homepage` or `:process_page`.
13
+
14
+ Content blocks are used in the organization homepage.
15
+
16
+ ## Registering a content block
17
+
18
+ Content blocks use the same manifests-registry pattern used in other places around Decidim. Here's how to register them:
19
+
20
+ ```ruby
21
+ Decidim.content_blocks.register(:homepage, :stats) do |content_block|
22
+ content_block.cell "decidim/content_blocks/stats_block"
23
+ content_block.public_name_key "decidim.content_blocks.stats_block.name"
24
+ end
25
+ ```
26
+
27
+ Let's analyze the example. In the first line, we register a content block named `:stats` for the `:homepage` scope. Then we define the name of the `cell` that will be used to render the content block, and we define the i18n key that holds the name for the content block. These are the only required fields to register a content block.
28
+
29
+ Note that content blocks need to be registered from an initializer. If you are adding a content block from a module, use this in the `engine.rb` file of your module:
30
+
31
+ ```ruby
32
+ module Decidim::MyModule::Engine < ::Rails::Engine
33
+ # ...
34
+
35
+ initializer "decidim.my_module.content_blocks" do
36
+ Decidim.content_blocks.register(:homepage, :my_content_block) do |content_block|
37
+ # ...
38
+ end
39
+ end
40
+
41
+ # ...
42
+ end
43
+ ```
44
+
45
+ ## Managing content blocks
46
+
47
+ Currently content blocks are only used in the homepage. You can manage them in the admin area, under Settings -> Homepage. you need to be an organization admin in order to enter this section.
48
+
49
+ You'll see all the registered content blocks, those active and those inactive. You can reorder blocks and (un)publish them.
50
+
51
+ ## Rendering content blocks
52
+
53
+ You can check the code we use in the homepage to render them, or use something like this:
54
+
55
+ ```ruby
56
+ <% Decidim::ContentBlock.published.for_scope(:homepage, organization: current_organization).each do |content_block| %>
57
+ <% next unless content_block.manifest %>
58
+ <%= cell content_block.manifest.cell %>
59
+ <% end %>
60
+ ```
@@ -85,3 +85,7 @@ Ideally, each engine should hold their own instance of `Decidim::ViewHooks`. Thi
85
85
  ## The engine I want to extend does not support view hooks, what can I do?
86
86
 
87
87
  First of all, send a PR to the engine to add the view hook you need. Expose your needs, so the developers can assess a view hook is the best solution. Sometimes a view hook can be replaced with another abstraction, or another UI. Meanwhile, you can use [`deface`](https://github.com/spree/deface) to extend a view file without replacing it. Be careful, since `deface` is *very* powerful and can be a double-edged sword. We considered adding `deface` to `decidim`, but found that it opened to a code that would be much harder to maintain.
88
+
89
+ ## View hooks drawbacks and alternatives
90
+
91
+ View hooks allow components to extend the views of other components without coupling, but they cannot be sorted by the user, and cannot hold options. Consider checking the content blocks abstraction for a more configurable setup.
@@ -8,7 +8,7 @@ As a technopolitical project, Decidim needs several things to work. This is a no
8
8
 
9
9
  1. Choose which **languages** do you want for your application. In case that your language isn't supported you should translate it on [Crowdin](https://crowdin.com/project/decidim).
10
10
 
11
- 1. Customize the [**look and feel**](https://github.com/decidim/decidim/blob/master/docs/customization/styles.md) (colors, pictures, fonts, etc).
11
+ 1. Customize the [**look and feel**](customization/styles.md) (colors, pictures, fonts, etc).
12
12
 
13
13
  1. Configure **SSL**. We recommend using at least [Let's Encrypt](https://letsencrypt.org/) for a minimum security. You should also check that there's an enforced redirection from HTTP to HTTPS on your web server.
14
14
 
@@ -20,15 +20,17 @@ As a technopolitical project, Decidim needs several things to work. This is a no
20
20
 
21
21
  1. Setup **backup** on your server. The most important things to save are the `public/uploads` and the database.
22
22
 
23
- 1. Decide and implement which kind of **[Authorization](docs/customization/authorization.md)** you're going to use.
23
+ 1. Decide and implement which kind of **[Authorization](customization/authorizations.md)** you're going to use.
24
24
 
25
25
  1. Comply with our License (Affero GPL 3) and **publish your code** to [GitHub](http://github.com) or wherever you want.
26
26
 
27
27
  1. Review your **decidim initializer** on your application (config/initializers/decidim.rb).
28
28
 
29
- 1. Configure your [**ActiveJob**](https://github.com/decidim/decidim/blob/master/docs/services/activejob.md) background queue.
29
+ 1. Configure your [**ActiveJob**](services/activejob.md) background queue.
30
30
 
31
- 1. If you want, configure your [**social providers**](https://github.com/decidim/decidim/blob/master/docs/services/social_providers.md) to enable login using external applications.
31
+ 1. If you want, configure your [**social providers**](services/social_providers.md) to enable login using external applications.
32
+
33
+ 1. Check that you don't have any **default users, emails and passwords**, neither on the admin or on the system panel.
32
34
 
33
35
  ## Contents
34
36
 
@@ -101,6 +101,10 @@ bundle exec rubocop
101
101
  bundle exec rubocop -a
102
102
  ```
103
103
 
104
+ ### Markdown linter
105
+
106
+ This project uses [markdownlint](https://github.com/markdownlint/markdownlint) to check markdown files and flag style issues.
107
+
104
108
  ## Good to know
105
109
 
106
110
  - There is an application with current designs at: https://decidim-design.herokuapp.com/
@@ -3,6 +3,6 @@
3
3
  # This holds the decidim version and the faker version it uses.
4
4
  module Decidim
5
5
  def self.version
6
- "0.13.1"
6
+ "0.14.1"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.1
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-07-24 00:00:00.000000000 Z
13
+ date: 2018-09-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-accountability
@@ -18,252 +18,252 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.13.1
21
+ version: 0.14.1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.13.1
28
+ version: 0.14.1
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: decidim-admin
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.13.1
35
+ version: 0.14.1
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.13.1
42
+ version: 0.14.1
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: decidim-api
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.13.1
49
+ version: 0.14.1
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.13.1
56
+ version: 0.14.1
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: decidim-assemblies
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.13.1
63
+ version: 0.14.1
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.13.1
70
+ version: 0.14.1
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: decidim-blogs
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.13.1
77
+ version: 0.14.1
78
78
  type: :runtime
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - '='
83
83
  - !ruby/object:Gem::Version
84
- version: 0.13.1
84
+ version: 0.14.1
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: decidim-budgets
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - '='
90
90
  - !ruby/object:Gem::Version
91
- version: 0.13.1
91
+ version: 0.14.1
92
92
  type: :runtime
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - '='
97
97
  - !ruby/object:Gem::Version
98
- version: 0.13.1
98
+ version: 0.14.1
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: decidim-comments
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - '='
104
104
  - !ruby/object:Gem::Version
105
- version: 0.13.1
105
+ version: 0.14.1
106
106
  type: :runtime
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - '='
111
111
  - !ruby/object:Gem::Version
112
- version: 0.13.1
112
+ version: 0.14.1
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: decidim-core
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - '='
118
118
  - !ruby/object:Gem::Version
119
- version: 0.13.1
119
+ version: 0.14.1
120
120
  type: :runtime
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
124
  - - '='
125
125
  - !ruby/object:Gem::Version
126
- version: 0.13.1
126
+ version: 0.14.1
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: decidim-debates
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - '='
132
132
  - !ruby/object:Gem::Version
133
- version: 0.13.1
133
+ version: 0.14.1
134
134
  type: :runtime
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - '='
139
139
  - !ruby/object:Gem::Version
140
- version: 0.13.1
140
+ version: 0.14.1
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: decidim-generators
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
145
  - - '='
146
146
  - !ruby/object:Gem::Version
147
- version: 0.13.1
147
+ version: 0.14.1
148
148
  type: :runtime
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
152
  - - '='
153
153
  - !ruby/object:Gem::Version
154
- version: 0.13.1
154
+ version: 0.14.1
155
155
  - !ruby/object:Gem::Dependency
156
156
  name: decidim-meetings
157
157
  requirement: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - '='
160
160
  - !ruby/object:Gem::Version
161
- version: 0.13.1
161
+ version: 0.14.1
162
162
  type: :runtime
163
163
  prerelease: false
164
164
  version_requirements: !ruby/object:Gem::Requirement
165
165
  requirements:
166
166
  - - '='
167
167
  - !ruby/object:Gem::Version
168
- version: 0.13.1
168
+ version: 0.14.1
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: decidim-pages
171
171
  requirement: !ruby/object:Gem::Requirement
172
172
  requirements:
173
173
  - - '='
174
174
  - !ruby/object:Gem::Version
175
- version: 0.13.1
175
+ version: 0.14.1
176
176
  type: :runtime
177
177
  prerelease: false
178
178
  version_requirements: !ruby/object:Gem::Requirement
179
179
  requirements:
180
180
  - - '='
181
181
  - !ruby/object:Gem::Version
182
- version: 0.13.1
182
+ version: 0.14.1
183
183
  - !ruby/object:Gem::Dependency
184
184
  name: decidim-participatory_processes
185
185
  requirement: !ruby/object:Gem::Requirement
186
186
  requirements:
187
187
  - - '='
188
188
  - !ruby/object:Gem::Version
189
- version: 0.13.1
189
+ version: 0.14.1
190
190
  type: :runtime
191
191
  prerelease: false
192
192
  version_requirements: !ruby/object:Gem::Requirement
193
193
  requirements:
194
194
  - - '='
195
195
  - !ruby/object:Gem::Version
196
- version: 0.13.1
196
+ version: 0.14.1
197
197
  - !ruby/object:Gem::Dependency
198
198
  name: decidim-proposals
199
199
  requirement: !ruby/object:Gem::Requirement
200
200
  requirements:
201
201
  - - '='
202
202
  - !ruby/object:Gem::Version
203
- version: 0.13.1
203
+ version: 0.14.1
204
204
  type: :runtime
205
205
  prerelease: false
206
206
  version_requirements: !ruby/object:Gem::Requirement
207
207
  requirements:
208
208
  - - '='
209
209
  - !ruby/object:Gem::Version
210
- version: 0.13.1
210
+ version: 0.14.1
211
211
  - !ruby/object:Gem::Dependency
212
212
  name: decidim-sortitions
213
213
  requirement: !ruby/object:Gem::Requirement
214
214
  requirements:
215
215
  - - '='
216
216
  - !ruby/object:Gem::Version
217
- version: 0.13.1
217
+ version: 0.14.1
218
218
  type: :runtime
219
219
  prerelease: false
220
220
  version_requirements: !ruby/object:Gem::Requirement
221
221
  requirements:
222
222
  - - '='
223
223
  - !ruby/object:Gem::Version
224
- version: 0.13.1
224
+ version: 0.14.1
225
225
  - !ruby/object:Gem::Dependency
226
226
  name: decidim-surveys
227
227
  requirement: !ruby/object:Gem::Requirement
228
228
  requirements:
229
229
  - - '='
230
230
  - !ruby/object:Gem::Version
231
- version: 0.13.1
231
+ version: 0.14.1
232
232
  type: :runtime
233
233
  prerelease: false
234
234
  version_requirements: !ruby/object:Gem::Requirement
235
235
  requirements:
236
236
  - - '='
237
237
  - !ruby/object:Gem::Version
238
- version: 0.13.1
238
+ version: 0.14.1
239
239
  - !ruby/object:Gem::Dependency
240
240
  name: decidim-system
241
241
  requirement: !ruby/object:Gem::Requirement
242
242
  requirements:
243
243
  - - '='
244
244
  - !ruby/object:Gem::Version
245
- version: 0.13.1
245
+ version: 0.14.1
246
246
  type: :runtime
247
247
  prerelease: false
248
248
  version_requirements: !ruby/object:Gem::Requirement
249
249
  requirements:
250
250
  - - '='
251
251
  - !ruby/object:Gem::Version
252
- version: 0.13.1
252
+ version: 0.14.1
253
253
  - !ruby/object:Gem::Dependency
254
254
  name: decidim-verifications
255
255
  requirement: !ruby/object:Gem::Requirement
256
256
  requirements:
257
257
  - - '='
258
258
  - !ruby/object:Gem::Version
259
- version: 0.13.1
259
+ version: 0.14.1
260
260
  type: :runtime
261
261
  prerelease: false
262
262
  version_requirements: !ruby/object:Gem::Requirement
263
263
  requirements:
264
264
  - - '='
265
265
  - !ruby/object:Gem::Version
266
- version: 0.13.1
266
+ version: 0.14.1
267
267
  - !ruby/object:Gem::Dependency
268
268
  name: bundler
269
269
  requirement: !ruby/object:Gem::Requirement
@@ -319,9 +319,10 @@ files:
319
319
  - README.md
320
320
  - Rakefile
321
321
  - docs/advanced/activity_log.md
322
- - docs/advanced/add_authenticable_action.md
322
+ - docs/advanced/add_authorizable_action.md
323
323
  - docs/advanced/adding_fixtures_aka_dummy_content.md
324
324
  - docs/advanced/components.md
325
+ - docs/advanced/content_blocks.md
325
326
  - docs/advanced/content_processors.md
326
327
  - docs/advanced/data-picker.md
327
328
  - docs/advanced/deploy.md
@@ -346,6 +347,7 @@ files:
346
347
  - docs/development_guide.md
347
348
  - docs/getting_started.md
348
349
  - docs/manual-installation.md
350
+ - docs/possible_flows_for_proposal.png
349
351
  - docs/services/activejob.md
350
352
  - docs/services/analytics.md
351
353
  - docs/services/geocoding.md
@@ -373,7 +375,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
373
375
  version: '0'
374
376
  requirements: []
375
377
  rubyforge_project:
376
- rubygems_version: 2.7.6
378
+ rubygems_version: 2.7.7
377
379
  signing_key:
378
380
  specification_version: 4
379
381
  summary: Citizen participation framework for Ruby on Rails.
@@ -1,27 +0,0 @@
1
- # How to add a new authenticable action?
2
-
3
- ## Proposals example
4
-
5
- We're going to reproduce the steps to add an action (adhere) for a proposal step by step.
6
-
7
- ### Configuring a new 'adhere' action
8
-
9
- 1. Edit decidim-proposals/lib/decidim/proposals/component.rb
10
- 1. Add the new 'adhere' action into the `component.actions` array and save the file:
11
-
12
- ```ruby
13
- component.actions = %w(adhere vote create)
14
- ```
15
-
16
- 1. Translate the action for the corresponding key: `en.decidim.components.proposals.actions.adhere = Adhere`
17
- 1. Edit `app/permissions/decidim/proposals/permissions.rb` and add the corresponding permission.
18
- 1. Restart the server to pick up the changes.
19
- 1. Now the admin should be able to go to the Control Panel and edit `PROCESSES/Proposals/Permissions/Adhere` panel. There an `Authorization Handler` can be set.
20
-
21
- ### Using the new 'adhere' action
22
-
23
- With a user which has the selected permission verified:
24
-
25
- 1. Go to a Proposal detail in the front-end
26
- 1. Adhere to the current proposal (see ProposalAdhesionsController): the user should be able to perform an adhesion.
27
- - If the user had the required permission unverified, the 'adhere' button should block the action. You can check it with an unverified user.