Hi Everyone,
It is a pattern matching based authorization system.
Depending on what action type is currently being handled it will grab these three things and put them into a single object:
The session of the user who submitted the operation (from a connect based session store).
When applicable it will also grab a snapshot of the doc (in the case of update, read, delete).
The operation (in the case of update).
This allows a user of the module to define patterns that determine whether the action should be accepted or rejected. Can check the credentials of the user who submitted the ops.
Can also inspect the contents of the document to determine if the operation should be accepted.
Since it is data that is determining how to accept or reject, it can be modified at runtime.
--CrypticSwarm