Closed ErenYeager80 closed 3 years ago
You can impersonate whoever passes the rules you define in your canImpersonate()
function.
You can further refine it by adding restrictions in your canBeImpersonated()
function.
https://github.com/404labfr/laravel-impersonate#advanced-usage
Thanks, but this is not my mean. For example X is a customer, I want impersonate X, but when I Impersonated X, X has admin authorizations not customer authorizations
Do you mean that you want to give admin rights to the customer while impersonating?
To do that, maybe you could check isImpersonating and add additional privileges if appropriate.
Hi! How can I use that function.. Im administrator, I now impersonated a X user... but I need to know if Im a user or an administrator.
How can i check that? Auth::user()->isImpersonating() gives me an error
Call to undefined method App\Models\User::getImpersonatorId()
thanks!
Hi, Can I impersonate a user that is not admin but when that impersonated had admin authorization?