fix: use warn util

This commit is contained in:
Sagar Vora 2022-08-02 19:08:02 +05:30
parent 61ec026712
commit 53118367b2

View file

@ -28,10 +28,13 @@ rights = (
def check_admin_or_system_manager(user=None):
"""
DEPRECATED: This function will be removed in version 15.
Use `frappe.only_for` instead.
"""
from frappe.utils.commands import warn
warn(
"The function check_admin_or_system_manager will be deprecated in version 15."
'Please use frappe.only_for("System Manager") instead.',
category=PendingDeprecationWarning,
)
if not user:
user = frappe.session.user