         readUsers:
           _id: userId
 
-  # TODO: Move this code to the client side so that we do not have to duplicate document checks from Publication.Meta.collection.allow and modifications from Publication.Meta.collection.deny, see https://github.com/meteor/meteor/issues/1921
+  # TODO: Move this code to the client side so that we do not have to duplicate document checks from Annotation.Meta.collection.allow and modifications from Annotation.Meta.collection.deny, see https://github.com/meteor/meteor/issues/1921
   'annotation-grant-read-to-group': (annotationId, groupId) ->
     check annotationId, String
     check groupId, String
 
     throw new Meteor.Error 401, "User not signed in." unless Meteor.personId()
 
-    # We do not check here if publication exists or if group has already read permission because we have query below with these conditions
+    # We do not check here if annotation exists or if group has already read permission because we have query below with these conditions
 
     # TODO: Should be allowed also if user is admin
     # TODO: Should check if groupId is a valid one?

Annotation.Meta.collection.allow
  insert: (userId, doc) ->
    # TODO: Check whether inserted document conforms to schema
    # TODO: Check that author really has access to the publication

    return false unless userId



  return unless publicationId

  publishUsingPermissions @, (isAdmin, groups) =>
    if isAdmin
      'publication._id': publicationId
    else
      'publication._id': publicationId
      $or: [
        access: Annotation.ACCESS.PUBLIC
      ,
        access: Annotation.ACCESS.PRIVATE
        'readUsers._id': @personId
      ,
        access: Annotation.ACCESS.PRIVATE
        'readGroups._id':
          $in: groups
      ]
  ,
    Annotation.PUBLIC_FIELDS()
