Skip to content
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

Impersonate from user menu dropdown #6524 #6533

Open
wants to merge 1 commit into
base: 4.x
Choose a base branch
from

Conversation

eliasfernandez
Copy link

This commit introduces a feature to allow user impersonation within the EasyAdminBundle interface.

Specifically, it adds a new menu option for users with the necessary permissions to switch to a different user profile from the user profile dropdown menu.

The changes include creating a new AccessImpersonationMenuItem class, defining related translations, and updating JavaScript to handle the impersonation modal's behaviour. This update makes it easier to manage user impersonation directly within the EasyAdmin user interface.

I'm not very happy with the approach adding the necessary html to add the data-bs-toggle logic so happy to hear ideas.

It is related with #6524

@eliasfernandez eliasfernandez force-pushed the impersonate-from-user-menu-dropdown branch 2 times, most recently from 8371155 to e80ccc5 Compare November 12, 2024 17:05
@javiereguiluz javiereguiluz added this to the 4.x milestone Nov 19, 2024
@bytes-commerce
Copy link
Contributor

Amazing feature!!

@eliasfernandez
Copy link
Author

@javiereguiluz . Do you want me to fix these conflicts?

@bastien70
Copy link
Contributor

Hello, does this pull request allow you to fully manage the switch_user system? Currently my problem is that I cannot determine the url to redirect the user to when he exits "switch user" mode. It would be nice to be able to configure it.

@eliasfernandez
Copy link
Author

Hello, does this pull request allow you to fully manage the switch_user system? Currently my problem is that I cannot determine the url to redirect the user to when he exits "switch user" mode. It would be nice to be able to configure it.

@bastien70 , No. It doesn't add any configuration apart from the existing one. It add the frontend logic for the users with the role EA_CAN_SWITCH_USER to switch to a different user.

FireShot Capture 004 - Blog Posts - localhost
FireShot Capture 005 - Blog Posts - localhost

@eliasfernandez eliasfernandez force-pushed the impersonate-from-user-menu-dropdown branch from e80ccc5 to c01b778 Compare December 29, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants