-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
This may simply be me not understanding something here, so mainly I am requesting a clarification.
On lines 171-186 where _allow_create is commented and defined
/**
* A convenience method for declaring access control on creates, based on the
* value of the document before the operation is applied to it.
* @param {String} collectionName
* @param {Function} callback(docId, opData, doc, connectSession, next)
* where next(docId, opData, docBeforeOp, session, next)
*/
Store.prototype._allow_create = function (pattern, validate) {
this.shareClient._validatorsCreate.push(
function (collection, docName, opData, snapshotData, connectSession) {
if (! collectionMatchesPattern(collection, pattern)) return;
var newDoc = opData.create.data;
return validate(docName, newDoc, connectSession);
}
);
};Is the @param {Function} callback(docId, opData, doc, connectSession, next) in the comments supposed to correlate to validate(docName, newDoc, connectSession) in the code?
Metadata
Metadata
Assignees
Labels
No labels