The parameters for checking permissions. This includes:
doctype: The document type for which the permission is being checked.docname: The name or identifier of the document for which the permission is being checked.perm_type (optional): The type of permission to check. Defaults to 'read'. Other common types might include 'write', 'create', 'delete', etc.A promise that resolves to true if the user has the specified permission, or false if the permission is denied.
Checks if the user has the specified permission for a document.
This function performs an asynchronous request to the server to determine if the user has the required permission for a given document. Permissions are checked based on the document type (
doctype), document name (docname), and the type of permission requested (perm_type).Example
Example
Example
Throws
Throws an error if the request fails or if there is an issue with checking the permissions.