def get_users(doctype, name): """Get list of users with which this document is shared""" return frappe.db.sql("""select `name`, `user`, `read`, `write`, `share`, `everyone` from `tabDocShare` where share_doctype=%s and share_name=%s""", (doctype, name), as_dict=True)