roles and permission only localy

This commit is contained in:
salam committed 2025-10-15 14:39:28 +02:00
1 parent 148ce3fdc4
commit 15751e017f
2 files changed
+42 -41

No files matched your search

+5 -5
View File
@@ -24,11 +24,11 @@ class DatabaseSeeder extends Seeder
InhaltsverzeichnisSeeder::class, InhaltsverzeichnisSeeder::class,
]); ]);
// if (app()->isLocal()) { if (app()->isLocal()) {
Konto::factory()->count(10)->create(); Konto::factory()->count(10)->create();
Gutachter::factory()->count(30)->create(); Gutachter::factory()->count(30)->create();
Auftraggeber::factory()->count(30)->create(); Auftraggeber::factory()->count(30)->create();
// } }
$this->call([ $this->call([
RolesAndPermissionsSeeder::class, RolesAndPermissionsSeeder::class,
+37 -36
View File
@@ -19,43 +19,44 @@ class RolesAndPermissionsSeeder extends Seeder
], ],
['name'] ['name']
); );
if (app()->isLocal()) {
$user = User::factory()->create([
'konto_id' => '1',
'gender' => 'Herr',
'name' => 'Hermann Telser',
'email' => 'ht@webwerkstatt.tirol',
'password' => Hash::make('salam'),
'agb_akzeptiert' => true,
'super_admin' => true,
'app_verified_at' => now(),
'email_verified_at' => now(),
]);
$user->assignRole('super_admin');
$user->assignRole('konto_switch');
$user = User::factory()->create([ $user = User::factory()->create([
'konto_id' => '1', 'konto_id' => '1',
'gender' => 'Herr', 'gender' => 'Frau',
'name' => 'Hermann Telser', 'name' => 'Yvonne Bormes',
'email' => 'ht@webwerkstatt.tirol', 'email' => 'yvonne.bormes@ztkammer.at',
'password' => Hash::make('salam'), 'password' => Hash::make('yvonne'),
'agb_akzeptiert' => true, 'agb_akzeptiert' => true,
'super_admin' => true, 'app_verified_at' => now(),
'app_verified_at' => now(), 'email_verified_at' => now(),
'email_verified_at' => now(), ]);
]); $user->assignRole('gutachter');
$user->assignRole('super_admin');
$user->assignRole('konto_switch');
$user = User::factory()->create([ $user = User::factory()->create([
'konto_id' => '1', 'konto_id' => '2',
'gender' => 'Frau', 'gender' => 'Frau',
'name' => 'Yvonne Bormes', 'name' => 'Daniela Mandlez',
'email' => 'yvonne.bormes@ztkammer.at', 'email' => 'daniela.mandkez@kammerwest.at',
'password' => Hash::make('yvonne'), 'password' => Hash::make('daniela'),
'agb_akzeptiert' => true, 'agb_akzeptiert' => true,
'app_verified_at' => now(), 'app_verified_at' => now(),
'email_verified_at' => now(), 'email_verified_at' => now(),
]); ]);
$user->assignRole('gutachter'); $user->assignRole('gutachter');
}
$user = User::factory()->create([
'konto_id' => '2',
'gender' => 'Frau',
'name' => 'Daniela Mandlez',
'email' => 'daniela.mandkez@kammerwest.at',
'password' => Hash::make('daniela'),
'agb_akzeptiert' => true,
'app_verified_at' => now(),
'email_verified_at' => now(),
]);
$user->assignRole('gutachter');
} }
} }