Stuff
This commit is contained in:
parent
fccc353aaa
commit
01a41ee210
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue