-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: decidim private fields #307
base: develop
Are you sure you want to change the base?
Feat: decidim private fields #307
Conversation
So from the pipelines, I see I need to do at least:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for this. It is interesting but I think we should change some things.
The most important is that we already have a table for extra things related to a proposal (see the comments). we should use that table.
Another is that I think we should do this for the 28 series (branch develop
for the moment), as this is going to be to much work to maintain in both parts.
Then, shouldn't we use a different menu for this private fields? i think a low percentage of customization are going to use private fields and rendering duplicated FormRenders in every box might slow down the browser quite a lot.
For overrides, we are using deface, this way we can touch smaller parts of views and it makes easier to maintain.
And finally, another thought that comes to mind is that we should use the encrypt built in in some attributes in Decidim (like authorizations). Precisely because it uses private data.
@@ -0,0 +1,12 @@ | |||
# frozen_string_literal: true | |||
|
|||
class CreatePrivateProposalFields < ActiveRecord::Migration[5.2] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this migration should use the table decidim_awesome_proposal_extra_fields
. it's seems unnecessary to add an additional table when we already have one for extras in proposals.
class CreatePrivateProposalFields < ActiveRecord::Migration[5.2] | ||
def change | ||
create_table :decidim_awesome_private_proposal_fields do |t| | ||
t.text :private_body, default: '<xml></xml>' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the current body uses a jsonb
field. Should we assume that this body would never be translated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, we should encrypt this field if it's going to keep private data
Putting this PR in draft the time I make the necessary updates. |
Include a new feature in the Awesome module: Add private fields to custom proposals.
As a participation designer, I can define private fields for proposals to ask proposers for personal information. This personal information could be required to submit a proposal and should not involve an extra step in the proposal submission process.
Context
The city of Lausanne wanted to request private fields for their Participatory Budgeting (PB) in order to:
Open Source Politics also contributes, financing adaptations for export and compatibility with version 0.27. <3
Solution
In the custom field administration, add another "custom field" zone, reserved for private fields.
In the form, add a section at the end for private fields.
Add an exporter, not exposed to open-data, to export personal data from the administration.
Change exporters of proposals to include custom fields.
Screenshots
Proposal form, user side
Confirm screen, without private data
Published proposal, without private data
Visualization of the fields, admin side
Export options for private data
Proposal administration