diff --git a/app/Http/Livewire/Library/LibraryTable.php b/app/Http/Livewire/Library/LibraryTable.php index d510f3b7..fc447da9 100644 --- a/app/Http/Livewire/Library/LibraryTable.php +++ b/app/Http/Livewire/Library/LibraryTable.php @@ -40,7 +40,7 @@ class LibraryTable extends Component public function loadLibraryItems($term = null) { $shouldBePublic = !$this->isLecturerPage; - if (!$shouldBePublic && !auth()->user()->is_lecturer) { + if (!$shouldBePublic && !auth()->user()?->is_lecturer) { abort(403); }