Test whether a given User has permission to perform some action on this Document
The User attempting modification
The attempted action
Does the User have permission?
Test whether a certain User has a requested permission level (or greater) over the Document
The User being tested
The permission level from DOCUMENT_OWNERSHIP_LEVELS to test
Additional options involved in the permission test
Does the user have this permission level over the Document?
Perform preliminary operations before a Document of this type is created. Pre-creation operations only occur for the client which requested the operation. Modifications to the pending document before it is persisted should be performed with this.updateSource().
The initial data object provided to the document creation request
Additional options which modify the creation request
The User requesting the document creation
A return value of false indicates the creation operation should be cancelled.
Initialize the instance by copying data from the source object to instance attributes. This mirrors the workflow of SchemaField#initialize but with some added functionality.
Default metadata which applies to each instance of this Document type.
The data schema for an ActiveEffect document.
ActiveEffectData
documents
Initial data from which to construct the ActiveEffect
Construction context options