Skip to content

Commit

Permalink
restore original permissions for standard and custom doctypes
Browse files Browse the repository at this point in the history
  • Loading branch information
Zlash65 committed Apr 27, 2018
1 parent 4eab463 commit d4a69c9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frappe/core/page/permission_manager/permission_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

0 comments on commit d4a69c9

Please sign in to comment.