Comments (9)
@MACscr
I have different fields, table columns, views, actions and more, based on the user role. Want to impersonate, to give support to customers. To make sure I see - what they see.
from filament-impersonate.
Hmm, give me a bit to spin up a fresh Filament v2 app. TBH I haven't even done that yet. I wrote this for v1, then received a PR request to make it v2 compatible, and haven't actually tried it out myself. Will do so here in a bit...
from filament-impersonate.
I just tagged v2.1, can you upgrade and let me know if you still have any issues? It's working well for me now with these latest fixes.
from filament-impersonate.
@jszobody
I installed v2.1, thankyou :)
But Impersonation doesn't work.
I can't access the Filament admin panel.
I can access the rest of the site, as a logged in user, but when I try to access /admin/ I get the login form.
I added this to the user model:
class User extends Authenticatable implements FilamentUser
{
use HasApiTokens, HasFactory, Notifiable, UserHasTeams, HasRoles;
public function canAccessFilament(): bool
{
return true;
}
public function canImpersonate(): bool
{
return true;
}
public function canBeImpersonated(): bool
{
return true;
}
from filament-impersonate.
Hmm, I was able to impersonate just fine with my fresh Filament v2 app.
It's worth pointing out though that the purpose of this package is for you (an admin) to impersonate a regular user in your "regular" app. It wasn't meant for you to impersonate another admin and use Filament itself as that other admin.
Does that make sense?
When you click the impersonation icon for one of your users, you should be redirected to your app homepage, and be able to navigate that as the impersonated user. In my case it's just a vanilla Jetstream app that I setup for testing.
from filament-impersonate.
Have you customized the Filament auth guard by chance?
config('filament.auth.guard')
from filament-impersonate.
The auth guard is default.
This is a fresh Laravel Breeze application, where I want all users to access the admin panel.
from filament-impersonate.
I assume your goal with the impersonate package then is to be able to test out their roles/permissions or whatever you set for the admin panel?
from filament-impersonate.
@jszobody Thank you for assisting me via Discord!
Enabling the AuthenticateSession middleware did the trick.
For other Breeze users :)
from filament-impersonate.
Related Issues (20)
- Enable to show banner HOT 5
- Formatting of Action in a group doesn't match other Actions HOT 6
- [Suggestion] Submit to Filament plugins site HOT 1
- Crashing when leaving impersonate HOT 4
- Cause gap on Filament Sidebar HOT 5
- Problem to impersonate with admin guard HOT 7
- Error on impersionate HOT 4
- Display issue HOT 8
- Error on redirect FilamentManager::getUserName() HOT 3
- Auto mode not working properly
- registerRenderHook(): Argument #1 ($name) must be of type string, null given HOT 6
- Banner hidden by my navbar HOT 1
- Trapped in exception when impersonating soft-deleted user HOT 1
- Table Impersonate does not work with widgets HOT 2
- Trouble on impersonate from resources other than UserResource HOT 2
- Add Laravel 11 support HOT 3
- ImpersonateManager does not leave the impersonation HOT 5
- localize HOT 1
- It does not work with Multi-Tenant app HOT 1
- Always impersonating myself HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filament-impersonate.