From 01a41ee210f4b9797814260f8478ab8e3a0e8c39 Mon Sep 17 00:00:00 2001 From: Kekskurse Date: Tue, 19 Jan 2021 23:33:41 +0100 Subject: [PATCH] Stuff --- app/Http/Controllers/PublicController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/PublicController.php b/app/Http/Controllers/PublicController.php index 528af09..4be15b9 100644 --- a/app/Http/Controllers/PublicController.php +++ b/app/Http/Controllers/PublicController.php @@ -45,7 +45,7 @@ class PublicController extends BaseController public function listGalleryImagesView($tenant, $gallery) { $tenant = Tenant::query()->where("url", "=", $tenant)->firstOrFail(); $gallery = Gallery::getByTenantAndUrl($tenant->id, $gallery); - if($gallery->status == "online" || ($gallery->status == "preview" && Auth::user()->id == $tenant->owner)) { + if($gallery->status == "online" || (Auth::check() && $gallery->status == "preview" && Auth::user()->id == $tenant->owner)) { $images = Image::query()->where("gallery", "=", $gallery->id)->whereNull("deleted_at")->get(); } else { abort( 404);