back buttons

This commit is contained in:
Benjamin Takats
2023-01-27 15:44:20 +01:00
parent be96475a09
commit e963c70854

View File

@@ -11,6 +11,17 @@ class InternArticleView extends Component
{ {
public LibraryItem $libraryItem; public LibraryItem $libraryItem;
public function mount()
{
$this->libraryItem->load([
'libraries',
]);
if ($this->libraryItem->libraries->where('is_public', false)
->count() > 0) {
abort(403, __('Sorry! You are not authorized to perform this action.'));
}
}
public function render() public function render()
{ {
if ($this->libraryItem->type === 'markdown_article') { if ($this->libraryItem->type === 'markdown_article') {