-
Notifications
You must be signed in to change notification settings - Fork 131
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
Redirect to /user/edit path only needed if we are admin. #135
Redirect to /user/edit path only needed if we are admin. #135
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
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 no longer work on this project, so leaving this review to remove it from my list of PRs on Github
@jpbostic just deployed in production with my fork at https://github.com/waycarbon/subspace with no issues. Thanks! |
@subspacecommunity/subspace-maintainers I believe this is ok to merge. Need a couple more eyes on it though. |
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.
Yup, worked just fine.
Many thanks for the contribution!
@all-contributors please add @jpbostic for code |
I've put up a pull request to add @jpbostic! 🎉 |
to:
cc: @subspacecommunity/subspace-maintainers
related to:
resolves: #134
Background
While evaluating an instance of Subspace running in its docker container (subspacecommunity/subspace:latest), I noticed that when I login as a normal user (via SAML), deletion of device profiles works but I get an error page after I click the "Delete device?" popup.
Running in debug mode showed a "permission denied" on the /user/edit path. When looking at a clone of the repo, I realized that the profileDeleteHandler is trying to redirect back to the /user/edit path even when I'm not logged in as an admin. Normal behavior should be to only redirect to /user/edit if I'm admin and otherwise move on (the redirect to the normal "success" path is immediately below this and it was obviously never being reached).
Changes
Testing
This was tested on a VM running a docker image built from these changes. Profiles were added to a normal account and then deleted using both an admin account and that regular account. Both ways now work without error.