mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-13 02:32:15 +01:00
Add core support for extendable authentication
add support for passwordless user creation; add filament loading support for new laravel modules namespacing; add support for pluggable password reset and login rules
This commit is contained in:
@@ -145,11 +145,21 @@ class User extends Authenticatable implements AuditableContract, FilamentUser, M
|
||||
return 'https://ui-avatars.com/api/?name='.urlencode($name).'&color=7F9CF5&background=EBF4FF';
|
||||
}
|
||||
|
||||
public function canAccessPanel(Panel $panel): bool
|
||||
public function isSuperAdmin(): bool
|
||||
{
|
||||
return in_array($this->email, config('auth.super_admins', []), true) && $this->hasVerifiedEmail();
|
||||
}
|
||||
|
||||
public function hasLocalPassword(): bool
|
||||
{
|
||||
return is_string($this->password) && $this->password !== '';
|
||||
}
|
||||
|
||||
public function canAccessPanel(Panel $panel): bool
|
||||
{
|
||||
return $this->isSuperAdmin();
|
||||
}
|
||||
|
||||
public function isMemberOfOrganization(Organization $organization): bool
|
||||
{
|
||||
if ($this->relationLoaded('organizations')) {
|
||||
|
||||
Reference in New Issue
Block a user