         db.merge doc._id, doc, (err, result) ->
             return next err if err?
 
-            # Add the shareID for each shared document
-            addShareIDDocs doc.rules, doc._id, (err) ->
-                return next err if err?
-
-                # Params structure for the replication
-                share =
-                    target : target
-                    doc    : doc
-
-                req.share = share
-                next()
+            # Params structure for the replication
+            share =
+                target : target
+                doc    : doc
+
+            req.share = share
+            next()
 
 
 # Replicate documents to the target url

            next err
        else
            share.shareID = res._id
            req.share = share
            next()


# Delete an existing sharing, on the sharer side

        if err?
            next err
        else
            res.status(200).send success: true, shareID: share.shareID


# Send a sharing revocation for each target defined in the share object
