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

Feature request: Add impersonation interface and don't force 404labfr #78

Open
modstore opened this issue Jan 2, 2021 · 3 comments
Open

Comments

@modstore
Copy link
Contributor

modstore commented Jan 2, 2021

Super useful package by the way!

I have my own custom impersonation functionality and don't need the 404labfr package.

I have forked the package and removed the requirement for the 404labfr package and it's working nicely, so if I could suggest adding an interface with the required methods:
clear
findUserById
isImpersonating
leave

And can then it's possible register the 'impersonate' service with those methods and any custom impersonation service can be used.

And a suggestion to use the 404labfr package by default.

If this is something you're interested in adding, I'm happy to make a PR.

@KABBOUCHI
Copy link
Owner

Yes go ahead, make a PR.

I think the best option is to add the manager in the config as null, and fallback to 404labfr manager if config('nova-impersonate.manager') is null.

$this->manager = app('impersonate');

@modstore
Copy link
Contributor Author

modstore commented Jan 3, 2021

#79

@crynobone
Copy link
Contributor

crynobone commented Mar 17, 2022

FYI in Nova 4 we will be introducing a new Laravel\Nova\Contracts\ImpersonatesUsers interface. I believe the integration with 404labfr will be much simplified moving forward by just implementing the contract and use the UI available directly from Nova.

https://twitter.com/taylorotwell/status/1502026262923124738

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

3 participants