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
FEATURE: Implement user impersonation #3648
Conversation
Will reference another PR in the |
72b9f6b
to
451b515
Compare
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 guess this is the code from Unikka.LoginAs, give or take a little? I love that already!
For this, can we please have strict typing, typed arguments and all that jazz? This is going into master, after all. 😎
abcab42
to
d70ea9c
Compare
Extending the neos with endpoints to impersonate a logged in user and also restoring the user. For that the change will add a new controller ImpersonateController for the backend. Backend Administrators will get the permission to impersonate users and everbody is able to restore the origin user if the user is authenticated by the impersonation. The change extends the user management module with a button for each user and the user menu in the to bar to be able to restore the user. The user menu in the content module needs to be adjusted in the neos-ui.
Co-authored-by: Karsten Dambekalns <karsten@dambekalns.de>
568475e
to
31b472d
Compare
Prevent exceptions when the session is not started yet.
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.
Works beautifully! ❤️ Just the change for the Neos.UI is missing…
Sorry, will provide the UI change today 🙈 |
With Neos 8.0 we introduce the impersonation feature. So, it is possible to impersonate as a different user from the user management module. This change will add related endpoints to the neos-ui to be able to communicate with the Neos.Neos API. The impersonation state will be saved in the Redux store, and a saga handles the restore of the origin user. Besides the data handling stuff, we also add a new button to the user menu. Related Neos PR: neos/neos-development-collection#3648
Finally, the PR for the UI. Sorry it took a bit longer, but it was not just copy and paste. The Unikka.LoginAs package makes some parts bit different and does not use the real APIs and the Store. But with that changes, it is easier to detect the state from other packages and areas in the UI as well. |
Extending the Neos with endpoints to impersonate a logged-in user and also restoring the user.
For that, the change will add a new controller ImpersonateController for the backend.
Backend Administrators will get the permission to impersonate users, and everybody is able to restore the origin user if the user is authenticated by the impersonation. The change extends the user management module with a button for each user and the user menu in the to bar to be able to restore the user.
The user menu in the content module needs to be adjusted in the neos-ui.
Screen.Recording.2022-03-21.at.15.56.27.mp4
Resolves: #3647