mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-01 23:53:21 +00:00
* fix: Add authorization checks on internal functions (#55709)
(cherry picked from commit ba936eefab)
# Conflicts:
# erpnext/accounts/doctype/pos_profile/pos_profile.py
# erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
# erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.py
# erpnext/support/doctype/issue/issue.py
* chore: conflicts
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
@@ -427,6 +427,7 @@ def deactivate_sales_person(status=None, employee=None):
|
||||
@frappe.whitelist()
|
||||
def create_user(employee: str, email: str | None = None, create_user_permission: int = 0) -> str:
|
||||
emp = frappe.get_doc("Employee", employee)
|
||||
emp.check_permission("write")
|
||||
if emp.user_id:
|
||||
frappe.throw(_("Employee {0} already has a linked user").format(emp.name))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user