Compare commits
5 Commits
98abc637c8
...
feature/da
| Author | SHA1 | Date | |
|---|---|---|---|
| e07984fa97 | |||
| dd3c623bfc | |||
| 9f47e6e2c8 | |||
| fd53a28f03 | |||
| bbcffe64b7 |
@@ -63,3 +63,10 @@ AWS_BUCKET=
|
|||||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||||
|
|
||||||
VITE_APP_NAME="${APP_NAME}"
|
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
|
||||||
|
|||||||
@@ -64,6 +64,16 @@ class User extends Authenticatable implements FilamentUser, LdapAuthenticatable
|
|||||||
return $this->hasRole('administrator');
|
return $this->hasRole('administrator');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getLdapGuidColumn(): string
|
||||||
|
{
|
||||||
|
return 'ldap_guid';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLdapDomainColumn(): string
|
||||||
|
{
|
||||||
|
return 'ldap_domain';
|
||||||
|
}
|
||||||
|
|
||||||
public function emergencyContacts(): HasMany
|
public function emergencyContacts(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(EmergencyContact::class);
|
return $this->hasMany(EmergencyContact::class);
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ services:
|
|||||||
- sail
|
- sail
|
||||||
openldap:
|
openldap:
|
||||||
image: 'osixia/openldap:1.5.0'
|
image: 'osixia/openldap:1.5.0'
|
||||||
|
command: '--copy-service'
|
||||||
ports:
|
ports:
|
||||||
- '${FORWARD_LDAP_PORT:-389}:389'
|
- '${FORWARD_LDAP_PORT:-389}:389'
|
||||||
- '${FORWARD_LDAPS_PORT:-636}:636'
|
- '${FORWARD_LDAPS_PORT:-636}:636'
|
||||||
@@ -98,6 +99,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- 'sail-ldap-data:/var/lib/ldap'
|
- 'sail-ldap-data:/var/lib/ldap'
|
||||||
- 'sail-ldap-config:/etc/ldap/slapd.d'
|
- 'sail-ldap-config:/etc/ldap/slapd.d'
|
||||||
|
- './docker/openldap/bootstrap.ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom/bootstrap.ldif'
|
||||||
networks:
|
networks:
|
||||||
- sail
|
- sail
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
|||||||
46
docker/openldap/bootstrap.ldif
Normal file
46
docker/openldap/bootstrap.ldif
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# People OU
|
||||||
|
dn: ou=people,dc=travel,dc=local
|
||||||
|
objectClass: organizationalUnit
|
||||||
|
ou: people
|
||||||
|
|
||||||
|
# Administrator
|
||||||
|
dn: uid=admin,ou=people,dc=travel,dc=local
|
||||||
|
objectClass: inetOrgPerson
|
||||||
|
objectClass: posixAccount
|
||||||
|
objectClass: shadowAccount
|
||||||
|
cn: Administrator
|
||||||
|
sn: Administrator
|
||||||
|
uid: admin
|
||||||
|
mail: admin@travel.local
|
||||||
|
uidNumber: 1000
|
||||||
|
gidNumber: 1000
|
||||||
|
homeDirectory: /home/admin
|
||||||
|
userPassword: password
|
||||||
|
|
||||||
|
# Travel Approver
|
||||||
|
dn: uid=approver,ou=people,dc=travel,dc=local
|
||||||
|
objectClass: inetOrgPerson
|
||||||
|
objectClass: posixAccount
|
||||||
|
objectClass: shadowAccount
|
||||||
|
cn: Travel Approver
|
||||||
|
sn: Approver
|
||||||
|
uid: approver
|
||||||
|
mail: approver@travel.local
|
||||||
|
uidNumber: 1001
|
||||||
|
gidNumber: 1000
|
||||||
|
homeDirectory: /home/approver
|
||||||
|
userPassword: password
|
||||||
|
|
||||||
|
# Staff Member
|
||||||
|
dn: uid=staff,ou=people,dc=travel,dc=local
|
||||||
|
objectClass: inetOrgPerson
|
||||||
|
objectClass: posixAccount
|
||||||
|
objectClass: shadowAccount
|
||||||
|
cn: Staff Member
|
||||||
|
sn: Member
|
||||||
|
uid: staff
|
||||||
|
mail: staff@travel.local
|
||||||
|
uidNumber: 1002
|
||||||
|
gidNumber: 1000
|
||||||
|
homeDirectory: /home/staff
|
||||||
|
userPassword: password
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"
|
||||||
x-data="{ theme: localStorage.getItem('theme') || 'light' }"
|
x-data="{ theme: localStorage.getItem('theme') || 'dark' }"
|
||||||
x-init="$watch('theme', val => { document.documentElement.setAttribute('data-bs-theme', val); localStorage.setItem('theme', val); }); document.documentElement.setAttribute('data-bs-theme', theme);"
|
x-init="$watch('theme', val => { document.documentElement.setAttribute('data-bs-theme', val); localStorage.setItem('theme', val); }); document.documentElement.setAttribute('data-bs-theme', theme);"
|
||||||
:data-bs-theme="theme"
|
:data-bs-theme="theme"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"
|
||||||
x-data="{ theme: localStorage.getItem('theme') || 'light' }"
|
x-data="{ theme: localStorage.getItem('theme') || 'dark' }"
|
||||||
x-init="document.documentElement.setAttribute('data-bs-theme', theme);"
|
x-init="document.documentElement.setAttribute('data-bs-theme', theme);"
|
||||||
:data-bs-theme="theme"
|
:data-bs-theme="theme"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ new #[Layout('components.layouts.guest')] class extends Component {
|
|||||||
{
|
{
|
||||||
$this->validate();
|
$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();
|
session()->regenerate();
|
||||||
$this->redirectIntended(route('dashboard'), navigate: true);
|
$this->redirectIntended(route('dashboard'), navigate: true);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user