]> BookStack Code Mirror - bookstack/blobdiff - app/Activity/Controllers/WatchController.php
Notifications: Add phpunit test for notification sending
[bookstack] / app / Activity / Controllers / WatchController.php
index e0596864cd195e0cfa6bdf5d0e6424b7ede6f7ff..43908812b60fb3874bb56b03f5fb4f0584518172 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace BookStack\Activity\Controllers;
 
-use BookStack\Activity\Models\Watch;
 use BookStack\Activity\Tools\UserEntityWatchOptions;
 use BookStack\App\Model;
 use BookStack\Entities\Models\Entity;
@@ -15,6 +14,9 @@ class WatchController extends Controller
 {
     public function update(Request $request)
     {
+        $this->checkPermission('receive-notifications');
+        $this->preventGuestAccess();
+
         $requestData = $this->validate($request, [
             'level' => ['required', 'string'],
         ]);