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

Cancel button not working after coming back from impersonation #92

Open
vluijkx opened this issue Sep 5, 2024 · 1 comment
Open

Cancel button not working after coming back from impersonation #92

vluijkx opened this issue Sep 5, 2024 · 1 comment

Comments

@vluijkx
Copy link

vluijkx commented Sep 5, 2024

We currently have 2 Filament resources. Organization and User. An organization has many users and the OrganizationResource edit page contains a RelationshipManager on which users can be impersonated.

This setup breaks the "Cancel" button on the organization page as this button seems to make use of the "_previous" session key. This key is not cached when impersonating. Because of this, the cancel button tries to take you back to the URL you were on while in impersonation mode.

@jszobody
Copy link
Member

jszobody commented Sep 5, 2024

It makes sense that the _previous session key would point back to the URL you were on while impersonating, if that is indeed the last page you visited. Not sure how to change that.

Keep in mind this package is a thin wrapper for Filament. The heavy lifting is done by https://github.com/404labfr/laravel-impersonate. If you think there is an opportunity to cache/preserve the _previous URL when entering or leaving impersonation, that's likely the repo where you want to have that discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants