docs/Features/Comment-Replies-And-Editing-Restriction.md
This document describes two related comment features (initial MVP versions).
Comments on a card can now reply to a specific earlier comment.
parentId field referencing the _id of
the comment it replies to. Top-level comments leave it empty.A board-level setting controls whether board admins may moderate other users' comments.
restrictCommentEditing (Boolean, default false).
false (default): historical behaviour — board admins may edit/delete any
comment on the board.true: board admins may not edit or delete comments authored by other
users. Only the comment's own author can edit/delete it.models/cardComments.js via
before.update / before.remove collection hooks, which throw a
Meteor.Error when the action is not allowed. The UI also hides the
edit/delete links accordingly, using the same decision function.canEditComment({ isAuthor, isBoardAdmin, restrictCommentEditing }) exported
from models/cardComments.js.Boards documents gain:
board.getRestrictCommentEditing() — returns the boolean.board.setRestrictCommentEditing(value) — updates the setting.