Prevent the account edit route through Devise#9611
Merged
andreslucena merged 4 commits intodecidim:developfrom Sep 13, 2022
Merged
Prevent the account edit route through Devise#9611andreslucena merged 4 commits intodecidim:developfrom
andreslucena merged 4 commits intodecidim:developfrom
Conversation
In order to prevent the default `/users/edit` route to be served through Devise.
andreslucena
requested changes
Sep 12, 2022
Member
andreslucena
left a comment
There was a problem hiding this comment.
Awesome! I can confirm that the route gives 404 👍🏽
We should remove the view and the relevant i18n keys (as far as I see those aren't used on other views):
https://github.com/decidim/decidim/blob/develop/decidim-core/app/views/decidim/devise/registrations/edit.html.erb
https://github.com/decidim/decidim/blob/develop/decidim-core/config/locales/en.yml?plain=1#L1689
Can you delete those please 🙏🏽?
Contributor
Author
|
@andreslucena Done. |
entantoencuanto
added a commit
that referenced
this pull request
Sep 13, 2022
* develop: Add missing character on code block (#9798) Fix hidden error messages on the registration form (#9625) Add documentation about configuring ActiveStorage / dynamic file uploads (#9777) Add documentation section about customizing cells (#9622) Fix hashtags not recognized at the beginning of the string (#9616) Fix version pages showing a HTTP 500 error when the version does not exist (#9615) Fix multitenant organizations stats cache (#9605) Prevent the account edit route through Devise (#9611) Fix iframe disabling producing invalid HTML (#9685) Fix import of images on spaces (#9779) Fix order of last activities (#9756) Fix leaking emails on admin user search controller (#9791) Ignore participatory spaces without models in meetings visible_for scope (#9790)
entantoencuanto
added a commit
that referenced
this pull request
Sep 15, 2022
* develop: (24 commits) Add develop index to the documentation (#9666) Fix initiatives components (#9633) Fix conference speaker avatars (#9643) Update `rokroskar/workflow-run-cleanup-action` GitHub action to v0.3.3 (#9750) Fix character counter for the WYSIWYG editor (#9680) Fix posting comments before the initial load has run (#9614) Fix parallel tests port in use (#9661) Split parallel test coverage reports into their own folders (#9686) Improve admin panel user experience regarding title links and order of actions (#9496) Fix title and description too long in initiatives spec sometimes (#9648) Fix API GraphiQL system spec with newer ChromeDriver (#9642) Add missing character on code block (#9798) Fix hidden error messages on the registration form (#9625) Add documentation about configuring ActiveStorage / dynamic file uploads (#9777) Add documentation section about customizing cells (#9622) Fix hashtags not recognized at the beginning of the string (#9616) Fix version pages showing a HTTP 500 error when the version does not exist (#9615) Fix multitenant organizations stats cache (#9605) Prevent the account edit route through Devise (#9611) Fix iframe disabling producing invalid HTML (#9685) ...
eliegaboriau
pushed a commit
to eliegaboriau/decidim
that referenced
this pull request
Oct 25, 2022
* Redefine the registration routes manually In order to prevent the default `/users/edit` route to be served through Devise. * Remove unused view and its translations
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?
The
/users/editroute is still available through Devise although Decidim implements its own account pages. This removes that.Note that this was not configurable through Devise directly so I had to add these routes manually the same way Devise adds them. This is happening here:
https://github.com/heartcombo/devise/blob/6d32d2447cc0f3739d9732246b5a5bde98d9e032/lib/devise/rails/routes.rb#L403-L418
📌 Related Issues
Testing
/users/editroute