feat: add frontend admin shortcut for staff
Build and Deploy / verify (push) Failing after 15m18s
Build and Deploy / deploy (push) Skipped

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:
gouki
2026-09-21 23:42:54 +00:00
co-authored by Cursor
parent 36c4ffc5b4
commit debead72a5
13 changed files with 644 additions and 0 deletions
+5
View File
@@ -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']);
}