chore: update field name
This commit is contained in:
parent
4829b50a8b
commit
c4c151ed9b
3 changed files with 7 additions and 7 deletions
|
|
@ -37,7 +37,7 @@
|
|||
"column_break_txqh",
|
||||
"deny_multiple_sessions",
|
||||
"disable_user_pass_login",
|
||||
"max_signups_per_hour",
|
||||
"max_signups_allowed_per_hour",
|
||||
"login_methods_section",
|
||||
"allow_login_using_mobile_number",
|
||||
"allow_login_using_user_name",
|
||||
|
|
@ -731,16 +731,16 @@
|
|||
},
|
||||
{
|
||||
"default": "300",
|
||||
"fieldname": "max_signups_per_hour",
|
||||
"fieldname": "max_signups_allowed_per_hour",
|
||||
"fieldtype": "Int",
|
||||
"label": "Max Signups Per Hour",
|
||||
"label": "Max signups allowed per hour",
|
||||
"non_negative": 1
|
||||
}
|
||||
],
|
||||
"icon": "fa fa-cog",
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2025-09-03 10:23:09.830755",
|
||||
"modified": "2025-09-03 10:52:38.096662",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "System Settings",
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class SystemSettings(Document):
|
|||
max_auto_email_report_per_user: DF.Int
|
||||
max_file_size: DF.Int
|
||||
max_report_rows: DF.Int
|
||||
max_signups_per_hour: DF.Int
|
||||
max_signups_allowed_per_hour: DF.Int
|
||||
minimum_password_score: DF.Literal["1", "2", "3", "4"]
|
||||
number_format: DF.Literal[
|
||||
"#,###.##",
|
||||
|
|
|
|||
|
|
@ -1035,8 +1035,8 @@ def sign_up(email: str, full_name: str, redirect_to: str) -> tuple[int, str]:
|
|||
else:
|
||||
return 0, _("Registered but disabled")
|
||||
else:
|
||||
max_signups_per_hour = cint(frappe.get_system_settings("max_signups_per_hour") or 300)
|
||||
if frappe.db.get_creation_count("User", 60) > max_signups_per_hour:
|
||||
max_signups_allowed_per_hour = cint(frappe.get_system_settings("max_signups_allowed_per_hour") or 300)
|
||||
if frappe.db.get_creation_count("User", 60) > max_signups_allowed_per_hour:
|
||||
frappe.respond_as_web_page(
|
||||
_("Temporarily Disabled"),
|
||||
_(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue