]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Middleware/Authenticate.php
Add the "Create Shelf" resp. "Create Book" to the home view
[bookstack] / app / Http / Middleware / Authenticate.php
index c9b2726e8c4eca4f9148f7567a035433bf216879..d840a9b2e05477c8fca1550dad9e9e81adaa8c2c 100644 (file)
@@ -37,11 +37,11 @@ class Authenticate
             }
         }
 
-        if ($this->auth->guest() && !setting('app-public')) {
+        if (!hasAppAccess()) {
             if ($request->ajax()) {
                 return response('Unauthorized.', 401);
             } else {
-                return redirect()->guest(baseUrl('/login'));
+                return redirect()->guest(url('/login'));
             }
         }