share_8.py 266 B

12345
  1. def check_share_permission(doctype, name):
  2. """Check if the user can share with other users"""
  3. if not frappe.has_permission(doctype, ptype="share", doc=name):
  4. frappe.throw(_("No permission to {0} {1} {2}".format("share", doctype, name)), frappe.PermissionError)