#111: Accessing the user activity page/JSON feed is now impossible when feeds are disabled. Also the Activity icon is not shown in the navbar when feeds are disabled.

This commit is contained in:
Andy Heathershaw 2018-11-17 16:02:31 +00:00
parent 3982f47243
commit 42a1e4b770
2 changed files with 11 additions and 1 deletions

View File

@ -22,6 +22,11 @@ class UserController extends Controller
{
public function activityFeed()
{
if (!UserConfig::get('social_user_feeds'))
{
return redirect(route('home'));
}
return Theme::render('gallery.user_activity_feed', [
'user' => $this->getUser()
]);
@ -29,6 +34,11 @@ class UserController extends Controller
public function activityFeedJson()
{
if (!UserConfig::get('social_user_feeds'))
{
return response()->json(['message' => 'Activity feeds not enabled']);
}
$user = $this->getUser();
$result = [];

View File

@ -6,7 +6,7 @@
<div class="collapse navbar-collapse" id="navbar-content">
<ul class="navbar-nav mr-auto">
@if (!Auth::guest())
@if (!Auth::guest() && UserConfig::get('social_user_feeds'))
<li class="nav-item">
<a class="nav-link" href="{{ route('userActivityFeed') }}">
<i class="fa fa-rss"></i> @lang('navigation.navbar.activity_feed')