       throw new Meteor.Error 'messageUpdate.unauthorized',
         "Insufficient permissions to edit message '#{id}' in group '#{old.group}'"
     checkPrivacy message.private, old, user
+    checkProtected message.protected, old.group, user
   check message,
     #url: Match.Optional String
     title: Match.Optional String

      ## Old default: public if available, private otherwise
      #if root?.threadPrivacy? and 'public' not in root.threadPrivacy
      #  message.private = true
    ## "Reply All" behavior: Initial access for a private message
    ## includes all coauthors and access of parent message,
    ## except for the actual author of this message which isn't needed.

            "Cannot make message public in thread '#{root._id}'"
  null

## Same logic as canProtect
checkProtected = (protect, group, user = Meteor.user()) ->
  if protect? and not canSuper group, false, user
    throw new Meteor.Error 'checkProtected.forbidden',
      "Insufficient permissions to (un)protect message in group '#{group}'"

@canCoauthorsMod = (message, coauthorsMod, client = Meteor.isClient, user = Meteor.user()) ->
  ## Adding coauthors requires no additional permission.
  ## Removing coauthors can be done in the following situations:
