Vodyanoï
Vodyanoï
FFilament
Created by Vodyanoï on 8/3/2024 in #❓┊help
403 Forbidden in production
Oh i'm actually not using the correct user model... Filament is using Admin model and not User. (might change that) It works after updating the Admin model, stupid mistake! Thank you !
17 replies
FFilament
Created by Vodyanoï on 8/3/2024 in #❓┊help
403 Forbidden in production
It returns false. So User model is not updated.
I don't actually understand why, I cleared artisan's and browser's cache
17 replies
FFilament
Created by Vodyanoï on 8/3/2024 in #❓┊help
403 Forbidden in production
It shouldn't be there in new versions ?
17 replies
FFilament
Created by Vodyanoï on 8/3/2024 in #❓┊help
403 Forbidden in production
Looks like it is :
2 => array:4 [▼
"file" => "vendor/filament/filament/src/Http/Middleware/Authenticate.php"
"line" => 32
"function" => "abort_if"
"args" => array:2 [▼
0 => true
1 => 403
]
]
2 => array:4 [▼
"file" => "vendor/filament/filament/src/Http/Middleware/Authenticate.php"
"line" => 32
"function" => "abort_if"
"args" => array:2 [▼
0 => true
1 => 403
]
]
abort_if(
$user instanceof FilamentUser ?
(! $user->canAccessPanel($panel)) :
(config('app.env') !== 'local'),
403,
);
abort_if(
$user instanceof FilamentUser ?
(! $user->canAccessPanel($panel)) :
(config('app.env') !== 'local'),
403,
);
17 replies
FFilament
Created by Vodyanoï on 8/3/2024 in #❓┊help
403 Forbidden in production
Nothing special, the system is quite permissive and no policies set in Laravel providers 403 is from Laravel (default 403 Forbidden page) I can share debug bar exception trace if it can help : last 10 calls :
vendor/laravel/framework/src/Illuminate/Foundation/Application.php#Symfony\Component\HttpKernel\Exception\HttpException


throw new NotFoundHttpException($message, null, 0, $headers);
}

throw new HttpException($code, $message, null, $headers);
}

/**

array:45 [▼
0 => array:6 [▼
"file" => "vendor/laravel/framework/src/Illuminate/Foundation/helpers.php"
"line" => 45
"function" => "abort"
"class" => "Illuminate\Foundation\Application"
"type" => "->"
"args" => array:3 [▶]
]
1 => array:4 [▼
"file" => "vendor/laravel/framework/src/Illuminate/Foundation/helpers.php"
"line" => 65
"function" => "abort"
"args" => array:3 [▶]
]
2 => array:4 [▼
"file" => "vendor/filament/filament/src/Http/Middleware/Authenticate.php"
"line" => 32
"function" => "abort_if"
"args" => array:2 [▶]
]
3 => array:6 [▼
"file" => "vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php"
"line" => 55
"function" => "authenticate"
"class" => "Filament\Http\Middleware\Authenticate"
"type" => "->"
"args" => array:2 [▶]
]
4 => array:6 [▼
"file" => "vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php"
"line" => 183
"function" => "handle"
"class" => "Illuminate\Auth\Middleware\Authenticate"
"type" => "->"
"args" => array:2 [▶]
]
5 => array:6 [▼
"file" => "vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php"
"line" => 49
"function" => "Illuminate\Pipeline\{closure}"
"class" => "Illuminate\Pipeline\Pipeline"
"type" => "->"
"args" => array:1 [▶]
]
6 => array:6 [▼
"file" => "vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php"
"line" => 183
"function" => "handle"
"class" => "Illuminate\View\Middleware\ShareErrorsFromSession"
"type" => "->"
"args" => array:2 [▶]
]
7 => array:6 [▼
"file" => "vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php"
"line" => 121
"function" => "Illuminate\Pipeline\{closure}"
"class" => "Illuminate\Pipeline\Pipeline"
"type" => "->"
"args" => array:1 [▶]
]
8 => array:6 [▼
"file" => "vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php"
"line" => 64
"function" => "handleStatefulRequest"
"class" => "Illuminate\Session\Middleware\StartSession"
"type" => "->"
"args" => array:3 [▶]
]
9 => array:6 [▼
"file" => "vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php"
"line" => 183
"function" => "handle"
"class" => "Illuminate\Session\Middleware\StartSession"
"type" => "->"
"args" => array:2 [▶]
]
vendor/laravel/framework/src/Illuminate/Foundation/Application.php#Symfony\Component\HttpKernel\Exception\HttpException


throw new NotFoundHttpException($message, null, 0, $headers);
}

throw new HttpException($code, $message, null, $headers);
}

/**

array:45 [▼
0 => array:6 [▼
"file" => "vendor/laravel/framework/src/Illuminate/Foundation/helpers.php"
"line" => 45
"function" => "abort"
"class" => "Illuminate\Foundation\Application"
"type" => "->"
"args" => array:3 [▶]
]
1 => array:4 [▼
"file" => "vendor/laravel/framework/src/Illuminate/Foundation/helpers.php"
"line" => 65
"function" => "abort"
"args" => array:3 [▶]
]
2 => array:4 [▼
"file" => "vendor/filament/filament/src/Http/Middleware/Authenticate.php"
"line" => 32
"function" => "abort_if"
"args" => array:2 [▶]
]
3 => array:6 [▼
"file" => "vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php"
"line" => 55
"function" => "authenticate"
"class" => "Filament\Http\Middleware\Authenticate"
"type" => "->"
"args" => array:2 [▶]
]
4 => array:6 [▼
"file" => "vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php"
"line" => 183
"function" => "handle"
"class" => "Illuminate\Auth\Middleware\Authenticate"
"type" => "->"
"args" => array:2 [▶]
]
5 => array:6 [▼
"file" => "vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php"
"line" => 49
"function" => "Illuminate\Pipeline\{closure}"
"class" => "Illuminate\Pipeline\Pipeline"
"type" => "->"
"args" => array:1 [▶]
]
6 => array:6 [▼
"file" => "vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php"
"line" => 183
"function" => "handle"
"class" => "Illuminate\View\Middleware\ShareErrorsFromSession"
"type" => "->"
"args" => array:2 [▶]
]
7 => array:6 [▼
"file" => "vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php"
"line" => 121
"function" => "Illuminate\Pipeline\{closure}"
"class" => "Illuminate\Pipeline\Pipeline"
"type" => "->"
"args" => array:1 [▶]
]
8 => array:6 [▼
"file" => "vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php"
"line" => 64
"function" => "handleStatefulRequest"
"class" => "Illuminate\Session\Middleware\StartSession"
"type" => "->"
"args" => array:3 [▶]
]
9 => array:6 [▼
"file" => "vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php"
"line" => 183
"function" => "handle"
"class" => "Illuminate\Session\Middleware\StartSession"
"type" => "->"
"args" => array:2 [▶]
]
17 replies