feat: add frontend admin shortcut for staff
Let admin and editor open /admin in a new tab from the public header and profile, so they can jump to the backend without leaving the site. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -22,6 +22,11 @@ class User extends Authenticatable implements FilamentUser
|
||||
use HasFactory, Notifiable, HasRoles, HasApiTokens;
|
||||
|
||||
public function canAccessPanel(Panel $panel): bool
|
||||
{
|
||||
return $this->canAccessAdmin();
|
||||
}
|
||||
|
||||
public function canAccessAdmin(): bool
|
||||
{
|
||||
return $this->hasRole(['admin', 'editor']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user