]> BookStack Code Mirror - bookstack/blobdiff - app/Activity/Tools/CommentTree.php
respective book and chapter structure added.
[bookstack] / app / Activity / Tools / CommentTree.php
index 3303add39b891ca69b6ef9694f5d5af102ea9dc7..16f6804ea4244358568c7a5bdc957953c6c93c2d 100644 (file)
@@ -41,6 +41,17 @@ class CommentTree
         return $this->tree;
     }
 
+    public function canUpdateAny(): bool
+    {
+        foreach ($this->comments as $comment) {
+            if (userCan('comment-update', $comment)) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
     /**
      * @param Comment[] $comments
      */