Fixes #134 - user profile link is made available if not logged in and the user's profile is public

This commit is contained in:
Andy Heathershaw 2019-10-19 21:03:06 +01:00
parent da99b0b05a
commit feb38c47b0
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@
@if (UserConfig::get('social_user_profiles'))
<i class="fa fa-fw fa-user ml-2"></i>
@can('view', $album->user)
@if (\App\User::currentOrAnonymous()->can('view', $album->user))
<a href="{{ $album->user->profileUrl() }}">{{ $album->user->publicDisplayName() }}</a>
@else
{{ $album->user->publicDisplayName() }}

View File

@ -22,7 +22,7 @@
@endif
@if (UserConfig::get('social_user_profiles'))
@can('view', $childAlbum->user)
@if (\App\User::currentOrAnonymous()->can('view', $childAlbum->user))
<a href="{{ $childAlbum->user->profileUrl() }}" data-toggle="tooltip" data-placement="top" title="{{ $childAlbum->user->publicDisplayName() }}"><i class="fa fa-fw fa-user ml-2"></i></a>
@else
<i class="fa fa-fw fa-user ml-2" data-toggle="tooltip" data-placement="top" title="{{ $childAlbum->user->publicDisplayName() }}"></i>