feat: Add log_error and FrappeClient to restricted python (#12857)
This commit is contained in:
parent
eb80f5dffb
commit
8678c09e91
1 changed files with 5 additions and 2 deletions
|
|
@ -12,6 +12,7 @@ from frappe.modules import scrub
|
|||
from frappe.www.printview import get_visible_columns
|
||||
import frappe.exceptions
|
||||
import frappe.integrations.utils
|
||||
from frappe.frappeclient import FrappeClient
|
||||
|
||||
class ServerScriptNotEnabled(frappe.PermissionError):
|
||||
pass
|
||||
|
|
@ -104,8 +105,10 @@ def get_safe_globals():
|
|||
make_post_request = frappe.integrations.utils.make_post_request,
|
||||
socketio_port=frappe.conf.socketio_port,
|
||||
get_hooks=frappe.get_hooks,
|
||||
sanitize_html=frappe.utils.sanitize_html
|
||||
sanitize_html=frappe.utils.sanitize_html,
|
||||
log_error=frappe.log_error
|
||||
),
|
||||
FrappeClient=FrappeClient,
|
||||
style=frappe._dict(
|
||||
border_color='#d1d8dd'
|
||||
),
|
||||
|
|
@ -297,4 +300,4 @@ VALID_UTILS = (
|
|||
"formatdate",
|
||||
"get_user_info_for_avatar",
|
||||
"get_abbr"
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue