log-viewer
log-viewer copied to clipboard
User is not available
In all API requests, such as log-viewer/api/folders etc., the User is not available, so if I check user in
LogViewer::auth(function ($request) {
$user = $request ? $request->user() : auth()->user();
});
or
Gate::define('viewLogViewer', function (?User $user) {
// return true if the user is allowed access to the Log Viewer
});
The user is null. Which makes it impossible to use "Authorizing access to Log Viewer".