Merge pull request 'Fix LDAP authentication failures' (#7) from worktree-ldap-issues into master
Some checks failed
linter / quality (push) Successful in 1m23s
security / Dependency Audit (push) Successful in 1m29s
security / Static Analysis (push) Successful in 1m42s
tests / ci (8.5) (push) Has been cancelled
tests / ci (8.4) (push) Has been cancelled

Reviewed-on: #7
This commit was merged in pull request #7.
This commit is contained in:
2026-03-06 10:35:45 +08:00
3 changed files with 18 additions and 1 deletions

View File

@@ -63,3 +63,10 @@ AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
VITE_APP_NAME="${APP_NAME}"
LDAP_HOST=openldap
LDAP_USERNAME="cn=admin,dc=travel,dc=local"
LDAP_PASSWORD=adminpassword
LDAP_PORT=389
LDAP_BASE_DN="dc=travel,dc=local"
LDAP_LOGGING=true

View File

@@ -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);

View File

@@ -18,7 +18,7 @@ new #[Layout('components.layouts.guest')] class extends Component {
{
$this->validate();
if (Auth::attempt(['username' => $this->username, 'password' => $this->password], $this->rememberMe)) {
if (Auth::attempt(['uid' => $this->username, 'password' => $this->password], $this->rememberMe)) {
session()->regenerate();
$this->redirectIntended(route('dashboard'), navigate: true);
return;