Standardize direct verification for one-time participation #13579
Standardize direct verification for one-time participation #13579
Conversation
decidim-verifications/app/controllers/decidim/verifications/authorizations_controller.rb
Fixed
Show fixed
Hide fixed
1ddd265 to
2b08524
Compare
decidim-verifications/app/commands/decidim/verifications/authorize_user.rb
Outdated
Show resolved
Hide resolved
decidim-core/app/controllers/concerns/decidim/ephemeral_session_checker.rb
Show resolved
Hide resolved
6a77814 to
f2a1585
Compare
41a31bf to
f20e223
Compare
|
@decidim/product @NilHomedes as we've talked this morning @entantoencuanto is finishing some details but the main things can be tested. Instructions:
|
|
Hey @entantoencuanto, thanks for the work done 💯 Fixes for Participatory Budget component
Verification form
Reference:
Successful final screen
Budgets landing page
Focus mode layout
Admin |
24b8120 to
2dbb881
Compare
Yes, that's it. We want to force the revocation of the authorizations, to prevent verification conflicts. But we must notify the admin.
Oh yes, you're right. I always forgot that :/ @ent I will wait to review this again until the PR is ready. Ping me again when you want me to do that |
|
I have a question about the behavior when ephemeral users recover the session in an edge case, @NilHomedes. Currently if an ephemeral user is created with a verification, its session can be recovered accessing with a verification with the same unique_id. But the verification is not updated and the original metadata remains, that is, if it was not previously authorized, it will continue to not be. Is it correct or the metadata should be updated with the new values provided by the verification flow? |
I'm not understanding how it can be possible that an ephemeral user was not verified? As far as I understand, to create an ephemeral user it will be necessary to be verified. So this problem can not exist.
The metadata that are you referring to, what is exactly? |
I see, well in that case I would update the metadata. So, at the end, the participant maintains their verification and can participate. We are thinking this feature to be implemented in short periods of time during a specific participatory process. Let's say during the two weeks of the voting phase. So, this district changes that you were mentioning, might not happen in a such a short period of time. |
How do you want this to be implemented? It's a little bit tricky (or I need ideas! :)
|
About this point the color of the bar depends on a custom organization color which has been removed here. I'm going to use the default success color |
2c2e7b2 to
ff96fde
Compare
|
@NilHomedes some of the review regarding design are preexisting things. For these kind of things, especially in a PR so big, it would be better to create new issues so the PR don't get delayed... We'll try to tackle them, but to have in mind for future times. |
I have been doing some research about this and from what I see this was implemented in this PR but the sticky behavior was reverted in other PR and currently is not available in develop. There is a reason for that change, so changing it again in this is PR I think will make it harder to track the potential conflict. There is a comment about this specific change: #13127 (comment) |
ff96fde to
6c3da7c
Compare
|
Hi @furilo and @entantoencuanto, answering your questions as follows:
To be honest, I don't know. This is not my field of expertise. I'm open to proposals here ;)
Which ones exactly? We can open specific PRs for those you think it might be better to treat it in another PR.
You are right. We have spoken about it in the Product meeting. This issue is already reported, and will be tackle by mantainers: #13488 |
|
@NilHomedes regarding this:
We have been trying for an hour to do a pure CSS-SVG to do the animation. Making the exact thing on the Figma is really tricky. We propose a simpler alternative: |
|
@furilo I don't like the fading. Maybe we would prefer something like this: https://codepen.io/kuvinod5/pen/WNvzazr |
Done, rebased onto develop |
Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
c2724a0
alecslupu
left a comment
There was a problem hiding this comment.
I have tried on local to configure a new ephemeral authorization, and i got an error when data is being submitted.
The below diff seems to fix the error.
diff --git a/decidim-admin/app/controllers/decidim/admin/component_permissions_controller.rb b/decidim-admin/app/controllers/decidim/admin/component_permissions_controller.rb
index 5f19729c40..2554f985bd 100644
--- a/decidim-admin/app/controllers/decidim/admin/component_permissions_controller.rb
+++ b/decidim-admin/app/controllers/decidim/admin/component_permissions_controller.rb
@@ -9,16 +9,14 @@ module Decidim
def edit
enforce_permission_to(:update, :component, component:)
- @permissions_form = PermissionsForm.new(
- permissions: permission_forms
- )
+ @permissions_form = form(PermissionsForm).from_params(permissions: permission_forms)
render template: "decidim/admin/resource_permissions/edit"
end
def update
enforce_permission_to(:update, :component, component:)
- @permissions_form = PermissionsForm.from_params(params)
+ @permissions_form = form(PermissionsForm).from_params(params)
UpdateComponentPermissions.call(@permissions_form, component, resource) do
on(:ok) do50 / 56
|
@entantoencuanto have you seen my comment ? cc @furilo , @ferblape , @andreslucena |
|
Change added, @alecslupu, you are right, the |
…3579) Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro> Co-authored-by: Hugoren Martinako <aumpfbahn@gmail.com>
Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro> Co-authored-by: Hugoren Martinako <aumpfbahn@gmail.com>
…3579) Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro> Co-authored-by: Hugoren Martinako <aumpfbahn@gmail.com>
…3579) Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro> Co-authored-by: Hugoren Martinako <aumpfbahn@gmail.com>
…3579) Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro> Co-authored-by: Hugoren Martinako <aumpfbahn@gmail.com>
…3579) Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro> Co-authored-by: Hugoren Martinako <aumpfbahn@gmail.com>
…ows features (#46) * Improve registration and verification flow (decidim#13295) Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro> Co-authored-by: Maxim Colls <collsmaxim@gmail.com> * Fix title on spec for the 'Create new proposal' page (decidim#14347) * Fix title on spec for the 'Create new proposal' page * Fix another spec * Remove scopes_select_field from dummy authorization form * Fix admin pipeline with `welcome_notification_body` spec error (decidim#14475) * Standardize direct verification for one-time participation (decidim#13579) Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro> Co-authored-by: Hugoren Martinako <aumpfbahn@gmail.com> * Fix title on spec for the 'Create new proposal' page (decidim#14347) * Fix title on spec for the 'Create new proposal' page * Fix another spec * Remove scope from tests * Make transferable authorization when duplicate user is ephemeral (decidim#13981) * Implement share and download buttons in budget successful vote screen (decidim#14283) Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro> * Extract success animation to a helper * Fix HexaPDF dependency (decidim#13834) * Fix HexaPDF dependency * Fix Gemfile * Remove reference to rqrcode * Update decidim-generators lockfile * Implement focus mode in the budget projects component (decidim#14512) Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro> * Allow customization of focus_mode_back_button text and path and use in projects index * Define a setting in budgets component to enter in focus mode by default voting budgets * Hide start voting button if voting is not available * Hide voting progress box in project show if not in focus mode * Consider focus mode settings in budgets lists cells * Adapt tests * Do not display vote text in budget list item cell if voting is not available * Set authorization_redirect_path of project vote button to take into account focus mode * Avoid duplication of button id * Allow displaying close focus mode or ephemeral session on header with focus mode back button * Adapt tests * Add missing i18n strings from ca/es (#49) * Use focus mode and Vote text regardless the allowed vote status * Define budget order status view in focus mode * Redirect to focus mode endpoints when component settings sets focus mode as default * Fix linter offense Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com> * Remove unused translations * Fix tests * Add new strings for the budgets voting phase * Remove 'Download your vote' from the success page in Budgets * Fix size in project's title * Remove unused strings * Change bold messages in the budget's voting explanation * Change behavior of the minimum budget so it's minimum projects * Redirect authorized vote button in projects index to the same page * Exclude focus navigation links from exit focus warning modal behavior * Normalize i18n on English locale and make consistent the other translations * Fix budget detail with "You voted for this" string (decidim#14284) * Adapt tests * Add highlighted colors on the different states of the budgets' voting (#55) * Add highlighted colors on the different states of the budgets' voting * Improve the message in the finished budget voting * Fix linter offense * Remove share button and fix header close button (#56) * Remove share button and center CTA * Add title to success page * Fix placing of the Cancel button in ephemeral/focus modes * Remove unused strings from i18n-tasks --------- Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro> Co-authored-by: Maxim Colls <collsmaxim@gmail.com> Co-authored-by: Hugoren Martinako <aumpfbahn@gmail.com> Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com> Co-authored-by: Andrés Pereira de Lucena <andreslucena@gmail.com> Co-authored-by: Francisco Bolívar <francisco.bolivar@nazaries.com>
















🎩 What? Why?
This PR allows the creation of ephemeral users which can start a session and verify to be allowed to perform an action.
The PR uses the onboarding feature and defines a new type of ephemeral users which are only allowed to verify and once verified navigate to perform the action associated to the onboarding data.
WIP
📌 Related Issues
Link your PR to an issue
Testing
We have configured this component https://decidim-lot2.populate.tools/processes/branch-highway/f/6/budgets/1/projects with the Ephemeral Verification. You can verify yourself:
With this you will start the ephemeral session and can try almost everything.
📷 Screenshots
Please add screenshots of the changes you are proposing
