]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controller.php
WYSIWYG: Updated TinyMCE from 6.5.1 to 6.7.2
[bookstack] / app / Http / Controller.php
index 78b899d25559fd63370fc62342b54e95d9ab6330..6e81dfd65738942ee30cdb542fe9775360c6a8a1 100644 (file)
@@ -66,6 +66,16 @@ abstract class Controller extends BaseController
         }
     }
 
+    /**
+     * Prevent access for guest users beyond this point.
+     */
+    protected function preventGuestAccess(): void
+    {
+        if (user()->isGuest()) {
+            $this->showPermissionError();
+        }
+    }
+
     /**
      * Check the current user's permissions against an ownable item otherwise throw an exception.
      */