How to exclude SG - SG replication from sync function

Especially, I would like to exclude SG-SG replication from being restricted by:

I am testing out the following:

“sync”: function(doc, oldDoc) { // console.log(oldDoc.creator); // Verify before delete if (doc._deleted){ requireRole("role:editor"); requireUser(oldDoc.writers); return; } // Properties check if (!doc.title) { throw({forbidden: "Missing required properties Title"}); } else if (!doc.creator) { throw({forbidden: "Missing required properties Creator"}); } else if (!doc.channels) { throw({forbidden: "Missing required properties Channels"}); } else if (!doc.writers) { throw({forbidden: "Missing required properties Writers"}); } else if (doc.writers.length == 0) { throw({forbidden: "No writters"}); } if (oldDoc == null) { requireRole("role:editor"); requireUser(doc.creator); } else { requireUser(oldDoc.writers); // Unless it is empty, creator is immutable if (oldDoc.creator) { if (doc.creator != oldDoc.creator) { throw({forbidden: "Can't change creator"}); } } } channel(doc.channels); }

I think the only way to exclude requireUser from SG-SG replication today would be to replicate against the admin REST API endpoint - the requireUser and requireRole method calls are no-ops when running as admin.

Thanks for the reply. I was able to verify it.