restore original permissions for standard and custom doctypes (#5498)
This commit is contained in:
parent
8923cb6aa9
commit
efa359e201
1 changed files with 2 additions and 3 deletions
|
|
@ -111,6 +111,5 @@ def get_users_with_role(role):
|
|||
@frappe.whitelist()
|
||||
def get_standard_permissions(doctype):
|
||||
frappe.only_for("System Manager")
|
||||
module = frappe.db.get_value("DocType", doctype, "module")
|
||||
path = get_file_path(module, "DocType", doctype)
|
||||
return read_doc_from_file(path).get("permissions")
|
||||
doc = frappe.get_doc('DocType', doctype)
|
||||
return [p.as_dict() for p in doc.permissions]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue