FIX: fix exception when accessing protected page

This commit is contained in:
Michal Kváček
2016-10-04 11:33:38 +02:00
parent f9dfe076a0
commit 7dcb8e280c
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -47,7 +47,8 @@ class ContentPage extends Controller
{ {
// test if loaded page is visible or not // test if loaded page is visible or not
if ($page->status == Content::STATUS_PROTECTED && !Auth::user()) { if ($page->status == Content::STATUS_PROTECTED && !Auth::user()) {
throw new \Exception('Cannot access protected resources'); // throw new \Exception('Cannot access protected resources');
abort(404);
} }
// add one new "view" for page // add one new "view" for page
@@ -27,7 +27,7 @@
} }
header { header {
background: #8aa800; background: #7cad2a;
padding: 30px 0; padding: 30px 0;
} }
@@ -56,7 +56,7 @@
@yield('content') @yield('content')
</div> </div>
<footer> <footer id="footer">
@if (!empty(setting('facebookProfile'))) @if (!empty(setting('facebookProfile')))
<a href="{{setting('facebookProfile')}}" target="_blank"> <a href="{{setting('facebookProfile')}}" target="_blank">