Fix LDAP authentication failures
All checks were successful
linter / quality (pull_request) Successful in 1m35s
security / Dependency Audit (pull_request) Successful in 1m19s
security / Static Analysis (pull_request) Successful in 1m32s
tests / ci (8.4) (pull_request) Successful in 2m36s
tests / ci (8.5) (pull_request) Successful in 1m37s
All checks were successful
linter / quality (pull_request) Successful in 1m35s
security / Dependency Audit (pull_request) Successful in 1m19s
security / Static Analysis (pull_request) Successful in 1m32s
tests / ci (8.4) (pull_request) Successful in 2m36s
tests / ci (8.5) (pull_request) Successful in 1m37s
- Add missing LDAP env vars to .env.example (host, base DN, bind credentials) - Use 'uid' instead of 'username' as the LDAP lookup attribute in Auth::attempt - Override getLdapGuidColumn/getLdapDomainColumn in User model to match migration column names (ldap_guid/ldap_domain vs default guid/domain)
This commit is contained in:
@@ -64,6 +64,16 @@ class User extends Authenticatable implements FilamentUser, LdapAuthenticatable
|
||||
return $this->hasRole('administrator');
|
||||
}
|
||||
|
||||
public function getLdapGuidColumn(): string
|
||||
{
|
||||
return 'ldap_guid';
|
||||
}
|
||||
|
||||
public function getLdapDomainColumn(): string
|
||||
{
|
||||
return 'ldap_domain';
|
||||
}
|
||||
|
||||
public function emergencyContacts(): HasMany
|
||||
{
|
||||
return $this->hasMany(EmergencyContact::class);
|
||||
|
||||
Reference in New Issue
Block a user