Fix to avoid registered users being invited again#7392
Merged
oriolgual merged 1 commit intodecidim:developfrom Feb 23, 2021
Merged
Fix to avoid registered users being invited again#7392oriolgual merged 1 commit intodecidim:developfrom
oriolgual merged 1 commit intodecidim:developfrom
Conversation
oriolgual
approved these changes
Feb 23, 2021
tramuntanal
added a commit
to CodiTramuntana/decidim
that referenced
this pull request
Feb 24, 2021
12 tasks
oriolgual
pushed a commit
that referenced
this pull request
Feb 24, 2021
entantoencuanto
added a commit
that referenced
this pull request
Feb 25, 2021
* develop: (232 commits) Add Votings to Open Data export (#7388) Add order in not highlighted assemblies by weight (#7444) Resort Menus (#7460) Polling Officer Zone (#7439) Fix session timeout when using multiple windows or tabs (#7459) Fix display of debates with multiple dates (#7393) chore: split election tests (#7451) style: make selected values primary labels with delete button (#7448) Fix and tests to avoid registered users being invited again (#7392) Migrate Admin menus to Menu Registry (#7368) New Crowdin updates (#7338) Bump to carrierwave 2.2.0 (#7441) Voting: show callout when Polling Stations miss Polling Officers (#7417) Further default orders for the API (#7436) Fix random order inconsistencies (#7437) Ensure Rails is locked to 5.2.4.x series (#7430) Add default order by ID to API list queries (#7424) Update dependencies (#7422) Ignore warning on CI when no artifacts to upload (#7420) Filter and search polling officers (#7411) ...
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎩 What? Why?
Please describe your pull request.
The PR makes sure that
InviteUserAgainis not invoked unless the user was previously invited and the invitation was pending. The bug is in usinguser.invitation_accepted?to check if the user has some invitation pending because it will return false both, when the user has an invitation pending to be accepted, and when the user was never invited (she signed up directly into the platform). This latter case is now controlled by askinguser.invited_to_sign_up?to devise.This PR also extracts repeated logic in
CreateAssemblyAdminandCreateParticipatoryProcessAdmincommands intodecidim-admin/app/commands/decidim/admin/create_participatory_space_admin_user_actions.rbmodule.📌 Related Issues
Link your PR to an issue
Testing
Describe the best way to test or validate your PR.
Sign up with a new user and invite her to admin an assembly. Then check that the user can still login and do not receives an invitation to register.
📋 Checklist
🚨 Please review the guidelines for contributing to this repository.
docs/.📷 Screenshots
Please add screenshots of the changes you're proposing
