Arthur Pen
Arthur Pen
FFilament
Created by Arthur Pen on 4/5/2025 in #❓┊help
Login issues
Yes, apologies I'm using Shield. I've updated the original message to help anyone searching in the future
8 replies
FFilament
Created by Arthur Pen on 4/5/2025 in #❓┊help
Login issues
after many hours I realised that you get this message if you have not assigned the user the panel_user role. Adding this fixed the issue. Having the super admin role overrides the need for the panel_user role hence [email protected] was working:
$user = User::factory()->create([
'name' => 'Admin User',
'email' => '[email protected]',
'password' => bcrypt('test'),
]);

$user->assignRole('super_admin');

$testuser = User::factory()->create([
'name' => 'Test User',
'email' => '[email protected]',
'password' => Hash::make('test'),
]);

$testuser->assignRole('panel_user');
$testuser->assignRole('Engineer');

$readonlyuser = User::create([
'name' => 'Readonly User',
'email' => '[email protected]',
'password' => bcrypt('test'),
]);

$readonlyuser->assignRole('panel_user');
$readonlyuser->assignRole('Read Only');
$user = User::factory()->create([
'name' => 'Admin User',
'email' => '[email protected]',
'password' => bcrypt('test'),
]);

$user->assignRole('super_admin');

$testuser = User::factory()->create([
'name' => 'Test User',
'email' => '[email protected]',
'password' => Hash::make('test'),
]);

$testuser->assignRole('panel_user');
$testuser->assignRole('Engineer');

$readonlyuser = User::create([
'name' => 'Readonly User',
'email' => '[email protected]',
'password' => bcrypt('test'),
]);

$readonlyuser->assignRole('panel_user');
$readonlyuser->assignRole('Read Only');
8 replies