File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
types/foundry/common/abstract Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -114,12 +114,18 @@ export default abstract class Document<
114114
115115 /**
116116 * Get the explicit permission level that a User has over this Document, a value in CONST.DOCUMENT_OWNERSHIP_LEVELS.
117- * This method returns the value recorded in Document ownership, regardless of the User's role.
117+ * Compendium content ignores the ownership field in favor of User role-based ownership. Otherwise, Documents use
118+ * granular per-User ownership definitions and Embedded Documents defer to their parent ownership.
119+ *
120+ * This method returns the value recorded in Document ownership, regardless of the User's role, for example a
121+ * GAMEMASTER user might still return a result of NONE if they are not explicitly denoted as having a level.
122+ *
118123 * To test whether a user has a certain capability over the document, testUserPermission should be used.
119- * @param {BaseUser } user The User being tested
120- * @returns {number|null } A numeric permission level from CONST.DOCUMENT_OWNERSHIP_LEVELS or null
124+ *
125+ * @param user The User being tested
126+ * @returns A numeric permission level from CONST.DOCUMENT_OWNERSHIP_LEVELS
121127 */
122- getUserLevel ( user : BaseUser ) : DocumentOwnershipLevel | null ;
128+ getUserLevel ( user : BaseUser ) : DocumentOwnershipLevel ;
123129
124130 /**
125131 * Test whether a certain User has a requested permission level (or greater) over the Document
You can’t perform that action at this time.
0 commit comments