updated design

This commit is contained in:
Mark Gregory
2026-08-25 14:41:15 +01:00
parent 3e6b3bfc79
commit 3c7361023c
18 changed files with 1828 additions and 76 deletions
+23 -1
View File
@@ -14,6 +14,7 @@ use Illuminate\Support\Str;
use Laravel\Fortify\Contracts\PasskeyUser;
use Laravel\Fortify\PasskeyAuthenticatable;
use Laravel\Fortify\TwoFactorAuthenticatable;
use Modules\Helpdesk\Concerns\HasHelpdeskTickets;
/**
* @property int $id
@@ -33,7 +34,7 @@ use Laravel\Fortify\TwoFactorAuthenticatable;
class User extends Authenticatable implements PasskeyUser
{
/** @use HasFactory<UserFactory> */
use HasFactory, Notifiable, PasskeyAuthenticatable, TwoFactorAuthenticatable;
use HasFactory, HasHelpdeskTickets, Notifiable, PasskeyAuthenticatable, TwoFactorAuthenticatable;
/**
* Get the attributes that should be cast.
@@ -45,9 +46,30 @@ class User extends Authenticatable implements PasskeyUser
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
'helpdesk_agent' => 'boolean',
'helpdesk_admin' => 'boolean',
];
}
/**
* Backwards-compatible application-level admin check.
*
* Helpdesk currently owns the admin role, so this maps to the
* Helpdesk admin permission flag.
*/
public function isAdmin(): bool
{
return $this->isHelpdeskAdmin();
}
/**
* Backwards-compatible application-level agent check.
*/
public function isAgent(): bool
{
return $this->isHelpdeskAgent();
}
/**
* Get the user's initials
*/