-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
BUGFIX: Use a dynamic URL for user impersonation #4875
Conversation
As described in the issue, the impersonation does not work when Neos is running in a subfolder. This change adds a data attribute with a dynamic URL to the DOM, and the user impersonation is using this module URL as base. Fixes: #4797
This PR needs also an adjustment in the Neos-UI and will be linked soon. |
Hmm usually we avoid string concatenating routes in the frontend (see neos ui) this._basePath + 'user-change'
this._basePath + 'status'
this._basePath + 'restore' but its your feature do as you feel fit :D |
@mhsdesign Yes that would be better but with Fluid you just have the |
Ok, we don't need the UI adjustment as we already use the dynamic URL here. |
Just tested it in a project using this "subfolder" setup:
We need to change the usage of neos-development-collection/Neos.Neos/Resources/Public/JavaScript/Components/TopBar/UserMenu.js Line 94 in d246fea
Line 83 in d246fea
|
@markusguenther I also found |
We now have another PR in the Neos-UI neos/neos-ui#3713 |
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.
Tested it with success in combination with neos/neos-ui#3713.
I agree with @mhsdesign about the server calculated endpoints. We for sure can change this when we refactor the user backend module to not use fluid anymore.
Thanks :D I dont know fluid well enough but i trust you so consider this as half approval ;) |
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.
By reading ;)
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.
Looks good by reading!
Still not a fan of the uri concatenation on the client, even if the uri would be uglier if generated from the server. |
As described in the issue, the impersonation does not work when Neos is running in a subfolder. This change adds a data attribute with a dynamic URL to the DOM, and the user impersonation is using this module URL as base.
Fixes: #4797
Review instructions
Use the user impersonation in the Backend modules (User Management and other) when Neos is running in a subfolder.
e.g. BASEURL.com/cms/neos
Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions