From feb38c47b0d1bbdf33240a81de4bcadeaf6629d0 Mon Sep 17 00:00:00 2001 From: Andy Heathershaw Date: Sat, 19 Oct 2019 21:03:06 +0100 Subject: [PATCH] Fixes #134 - user profile link is made available if not logged in and the user's profile is public --- resources/views/themes/base/gallery/index.blade.php | 2 +- .../views/themes/base/partials/gallery_child_album.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/themes/base/gallery/index.blade.php b/resources/views/themes/base/gallery/index.blade.php index ea7dbd9..f0cd704 100644 --- a/resources/views/themes/base/gallery/index.blade.php +++ b/resources/views/themes/base/gallery/index.blade.php @@ -29,7 +29,7 @@ @if (UserConfig::get('social_user_profiles')) - @can('view', $album->user) + @if (\App\User::currentOrAnonymous()->can('view', $album->user)) {{ $album->user->publicDisplayName() }} @else {{ $album->user->publicDisplayName() }} diff --git a/resources/views/themes/base/partials/gallery_child_album.blade.php b/resources/views/themes/base/partials/gallery_child_album.blade.php index 9cbea8a..7427149 100644 --- a/resources/views/themes/base/partials/gallery_child_album.blade.php +++ b/resources/views/themes/base/partials/gallery_child_album.blade.php @@ -22,7 +22,7 @@ @endif @if (UserConfig::get('social_user_profiles')) - @can('view', $childAlbum->user) + @if (\App\User::currentOrAnonymous()->can('view', $childAlbum->user)) @else