Compare commits
1 Commits
89b3ddb793
...
fix/ldap-a
| Author | SHA1 | Date | |
|---|---|---|---|
| 66316328bb |
@@ -97,6 +97,8 @@ services:
|
|||||||
LDAP_READONLY_USER_USERNAME: '${LDAP_READONLY_USERNAME:-readonly}'
|
LDAP_READONLY_USER_USERNAME: '${LDAP_READONLY_USERNAME:-readonly}'
|
||||||
LDAP_READONLY_USER_PASSWORD: '${LDAP_READONLY_PASSWORD:-readonly}'
|
LDAP_READONLY_USER_PASSWORD: '${LDAP_READONLY_PASSWORD:-readonly}'
|
||||||
volumes:
|
volumes:
|
||||||
|
- 'sail-ldap-data:/var/lib/ldap'
|
||||||
|
- 'sail-ldap-config:/etc/ldap/slapd.d'
|
||||||
- './docker/openldap/bootstrap.ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom/bootstrap.ldif'
|
- './docker/openldap/bootstrap.ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom/bootstrap.ldif'
|
||||||
networks:
|
networks:
|
||||||
- sail
|
- sail
|
||||||
@@ -134,3 +136,7 @@ volumes:
|
|||||||
driver: local
|
driver: local
|
||||||
sail-redis:
|
sail-redis:
|
||||||
driver: local
|
driver: local
|
||||||
|
sail-ldap-data:
|
||||||
|
driver: local
|
||||||
|
sail-ldap-config:
|
||||||
|
driver: local
|
||||||
|
|||||||
@@ -16,28 +16,28 @@ class DatabaseSeeder extends Seeder
|
|||||||
// Create roles
|
// Create roles
|
||||||
$this->call(RoleSeeder::class);
|
$this->call(RoleSeeder::class);
|
||||||
|
|
||||||
// Create admin user
|
// Create admin user — email matches LDAP mail attribute
|
||||||
$admin = User::factory()->create([
|
$admin = User::factory()->create([
|
||||||
'name' => 'Administrator',
|
'name' => 'Administrator',
|
||||||
'email' => 'admin@example.com',
|
'email' => 'admin@travel.local',
|
||||||
'username' => 'admin',
|
'username' => 'admin',
|
||||||
'password' => Hash::make('password'),
|
'password' => Hash::make('password'),
|
||||||
]);
|
]);
|
||||||
$admin->assignRole('administrator');
|
$admin->assignRole('administrator');
|
||||||
|
|
||||||
// Create a travel approver
|
// Create a travel approver — email matches LDAP mail attribute
|
||||||
$approver = User::factory()->create([
|
$approver = User::factory()->create([
|
||||||
'name' => 'Travel Approver',
|
'name' => 'Travel Approver',
|
||||||
'email' => 'approver@example.com',
|
'email' => 'approver@travel.local',
|
||||||
'username' => 'approver',
|
'username' => 'approver',
|
||||||
'password' => Hash::make('password'),
|
'password' => Hash::make('password'),
|
||||||
]);
|
]);
|
||||||
$approver->assignRole('travel_approver');
|
$approver->assignRole('travel_approver');
|
||||||
|
|
||||||
// Create a staff user
|
// Create a staff user — email matches LDAP mail attribute
|
||||||
$staff = User::factory()->create([
|
$staff = User::factory()->create([
|
||||||
'name' => 'Staff Member',
|
'name' => 'Staff Member',
|
||||||
'email' => 'staff@example.com',
|
'email' => 'staff@travel.local',
|
||||||
'username' => 'staff',
|
'username' => 'staff',
|
||||||
'password' => Hash::make('password'),
|
'password' => Hash::make('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') || 'dark' }"
|
x-data="{ theme: localStorage.getItem('theme') || 'light' }"
|
||||||
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') || 'dark' }"
|
x-data="{ theme: localStorage.getItem('theme') || 'light' }"
|
||||||
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"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user