Back to overview

This commit is contained in:
Benjamin Takats
2023-01-20 15:30:19 +01:00
parent f498154f85
commit a1e7a16ef1
2 changed files with 9 additions and 2 deletions

View File

@@ -11,6 +11,13 @@ class InternArticleView extends Component
{
public LibraryItem $libraryItem;
public function mount()
{
if (!$this->libraryItem->createdBy->hasRole('news-editor')) {
abort(403, 'This article is not available for viewing.');
}
}
public function render()
{
return view('livewire.news.intern-article-view')->layout('layouts.app', [