Browse Source

Merge pull request #15615 from ankush/perm_import

fix: AttributeError when calling frappe.permissions.$function
version-14
mergify[bot] 3 years ago
committed by GitHub
parent
commit
2ea25f0baa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      frappe/model/document.py

+ 2
- 0
frappe/model/document.py View File

@@ -188,6 +188,8 @@ class Document(BaseDocument):
is not set.

:param permtype: one of `read`, `write`, `submit`, `cancel`, `delete`"""
import frappe.permissions

if self.flags.ignore_permissions:
return True
return frappe.permissions.has_permission(self.doctype, permtype, self, verbose=verbose)


Loading…
Cancel
Save