The Document definition for a User. Defines the DataSchema and common behaviors for a User which are shared between both client and server.
Test whether the User has a GAMEMASTER or ASSISTANT role in this World?
Test whether the User is able to perform a certain permission action. The provided permission string may pertain to an explicit permission setting or a named user role. Alternatively, Gamemaster users are assumed to be allowed to take all actions.
The action to test
Does the user have the ability to perform this action?
Get the permission level that a specific User has over this Document, a value in CONST.DOCUMENT_OWNERSHIP_LEVELS.
The User being tested
A numeric permission level from CONST.DOCUMENT_OWNERSHIP_LEVELS or null
Test whether the User has at least a specific permission
The permission name from USER_PERMISSIONS to test
Does the user have at least this permission
Test whether the User has at least the permission level of a certain role
The role name from USER_ROLES to test
Require the role match to be exact
Does the user have at this role level (or greater)?
Validate the structure of the User hotbar object
The attempted hotbar data
Validate the structure of the User permissions object
The attempted permissions data
Default metadata which applies to each instance of this Document type.