Merge pull request #23446 from rmehta/system-settings-tabs
refactor: Add tabs to "System Settings"
This commit is contained in:
commit
a8c943fbdd
2 changed files with 93 additions and 58 deletions
|
|
@ -23,38 +23,23 @@
|
|||
"float_precision",
|
||||
"currency_precision",
|
||||
"rounding_method",
|
||||
"sec_backup_limit",
|
||||
"backup_limit",
|
||||
"encrypt_backup",
|
||||
"background_workers",
|
||||
"enable_scheduler",
|
||||
"dormant_days",
|
||||
"permissions",
|
||||
"apply_strict_user_permissions",
|
||||
"column_break_21",
|
||||
"allow_guests_to_upload_files",
|
||||
"force_web_capture_mode_for_uploads",
|
||||
"allow_older_web_view_links",
|
||||
"security_tab",
|
||||
"security",
|
||||
"session_expiry",
|
||||
"document_share_key_expiry",
|
||||
"column_break_13",
|
||||
"column_break_txqh",
|
||||
"deny_multiple_sessions",
|
||||
"disable_user_pass_login",
|
||||
"login_methods_section",
|
||||
"allow_login_using_mobile_number",
|
||||
"allow_login_using_user_name",
|
||||
"disable_user_pass_login",
|
||||
"column_break_uhqk",
|
||||
"login_with_email_link",
|
||||
"login_with_email_link_expiry",
|
||||
"allow_error_traceback",
|
||||
"strip_exif_metadata_from_uploaded_images",
|
||||
"allow_older_web_view_links",
|
||||
"password_settings",
|
||||
"logout_on_password_reset",
|
||||
"force_user_to_reset_password",
|
||||
"reset_password_link_expiry_duration",
|
||||
"password_reset_limit",
|
||||
"column_break_31",
|
||||
"enable_password_policy",
|
||||
"minimum_password_score",
|
||||
"brute_force_security",
|
||||
"allow_consecutive_login_attempts",
|
||||
"column_break_34",
|
||||
|
|
@ -66,6 +51,16 @@
|
|||
"two_factor_method",
|
||||
"lifespan_qrcode_image",
|
||||
"otp_issuer_name",
|
||||
"password_tab",
|
||||
"password_settings",
|
||||
"logout_on_password_reset",
|
||||
"force_user_to_reset_password",
|
||||
"reset_password_link_expiry_duration",
|
||||
"password_reset_limit",
|
||||
"column_break_31",
|
||||
"enable_password_policy",
|
||||
"minimum_password_score",
|
||||
"email_tab",
|
||||
"email",
|
||||
"email_footer_address",
|
||||
"email_retry_limit",
|
||||
|
|
@ -75,17 +70,31 @@
|
|||
"attach_view_link",
|
||||
"welcome_email_template",
|
||||
"reset_password_template",
|
||||
"prepared_report_section",
|
||||
"max_auto_email_report_per_user",
|
||||
"files_tab",
|
||||
"files_section",
|
||||
"max_file_size",
|
||||
"allow_guests_to_upload_files",
|
||||
"force_web_capture_mode_for_uploads",
|
||||
"strip_exif_metadata_from_uploaded_images",
|
||||
"column_break_uqma",
|
||||
"allowed_file_extensions",
|
||||
"updates_tab",
|
||||
"system_updates_section",
|
||||
"disable_system_update_notification",
|
||||
"disable_change_log_notification",
|
||||
"backups_tab",
|
||||
"sec_backup_limit",
|
||||
"backup_limit",
|
||||
"encrypt_backup",
|
||||
"advanced_tab",
|
||||
"prepared_report_section",
|
||||
"max_auto_email_report_per_user",
|
||||
"background_workers",
|
||||
"enable_scheduler",
|
||||
"dormant_days",
|
||||
"telemetry_section",
|
||||
"enable_telemetry",
|
||||
"files_section",
|
||||
"max_file_size",
|
||||
"column_break_uqma",
|
||||
"allowed_file_extensions"
|
||||
"allow_error_traceback",
|
||||
"enable_telemetry"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
|
|
@ -126,7 +135,6 @@
|
|||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "date_and_number_format",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Date and Number Format"
|
||||
|
|
@ -171,10 +179,8 @@
|
|||
"options": "\n0\n1\n2\n3\n4\n5\n6\n7\n8\n9"
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "sec_backup_limit",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Backups"
|
||||
"fieldtype": "Section Break"
|
||||
},
|
||||
{
|
||||
"default": "3",
|
||||
|
|
@ -184,7 +190,6 @@
|
|||
"label": "Number of Backups"
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "background_workers",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Background Workers"
|
||||
|
|
@ -198,7 +203,6 @@
|
|||
"label": "Enable Scheduled Jobs"
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "permissions",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Permissions"
|
||||
|
|
@ -211,10 +215,8 @@
|
|||
"label": "Apply Strict User Permissions"
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "security",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Security"
|
||||
"fieldtype": "Section Break"
|
||||
},
|
||||
{
|
||||
"default": "170:00",
|
||||
|
|
@ -223,10 +225,6 @@
|
|||
"fieldtype": "Data",
|
||||
"label": "Session Expiry (idle timeout)"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_13",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"description": "Note: Multiple sessions will be allowed in case of mobile device",
|
||||
|
|
@ -255,7 +253,6 @@
|
|||
"label": "Show Full Error and Allow Reporting of Issues to the Developer"
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "password_settings",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Password"
|
||||
|
|
@ -286,7 +283,6 @@
|
|||
"options": "2\n3\n4"
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "brute_force_security",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Brute Force Security"
|
||||
|
|
@ -309,7 +305,6 @@
|
|||
"label": "Allow Login After Fail"
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "two_factor_authentication",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Two Factor Authentication"
|
||||
|
|
@ -338,6 +333,7 @@
|
|||
},
|
||||
{
|
||||
"default": "OTP App",
|
||||
"depends_on": "enable_two_factor_auth",
|
||||
"description": "Choose authentication method to be used by all users",
|
||||
"fieldname": "two_factor_method",
|
||||
"fieldtype": "Select",
|
||||
|
|
@ -345,7 +341,7 @@
|
|||
"options": "OTP App\nSMS\nEmail"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.two_factor_method == \"OTP App\"",
|
||||
"depends_on": "eval:doc.enable_two_factor_auth && doc.two_factor_method == \"OTP App\"",
|
||||
"description": "Time in seconds to retain QR code image on server. Min:<strong>240</strong>",
|
||||
"fieldname": "lifespan_qrcode_image",
|
||||
"fieldtype": "Int",
|
||||
|
|
@ -359,10 +355,8 @@
|
|||
"label": "OTP Issuer Name"
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "email",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Email"
|
||||
"fieldtype": "Section Break"
|
||||
},
|
||||
{
|
||||
"description": "Your organization name and address for the email footer.",
|
||||
|
|
@ -430,7 +424,6 @@
|
|||
"label": "Include Web View Link in Email"
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "prepared_report_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Reports"
|
||||
|
|
@ -456,10 +449,8 @@
|
|||
"label": "Encrypt Backups"
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "system_updates_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "System Updates"
|
||||
"fieldtype": "Section Break"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
|
|
@ -547,7 +538,6 @@
|
|||
"label": "Disable Document Sharing"
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "telemetry_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Telemetry"
|
||||
|
|
@ -578,10 +568,8 @@
|
|||
"label": "Force Web Capture Mode for Uploads"
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "files_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Files"
|
||||
"fieldtype": "Section Break"
|
||||
},
|
||||
{
|
||||
"fieldname": "max_file_size",
|
||||
|
|
@ -598,12 +586,60 @@
|
|||
"fieldname": "allowed_file_extensions",
|
||||
"fieldtype": "Small Text",
|
||||
"label": "Allowed File Extensions"
|
||||
},
|
||||
{
|
||||
"fieldname": "security_tab",
|
||||
"fieldtype": "Tab Break",
|
||||
"label": "Login"
|
||||
},
|
||||
{
|
||||
"fieldname": "email_tab",
|
||||
"fieldtype": "Tab Break",
|
||||
"label": "Email"
|
||||
},
|
||||
{
|
||||
"fieldname": "files_tab",
|
||||
"fieldtype": "Tab Break",
|
||||
"label": "Files"
|
||||
},
|
||||
{
|
||||
"fieldname": "updates_tab",
|
||||
"fieldtype": "Tab Break",
|
||||
"label": "Updates"
|
||||
},
|
||||
{
|
||||
"fieldname": "backups_tab",
|
||||
"fieldtype": "Tab Break",
|
||||
"label": "Backups"
|
||||
},
|
||||
{
|
||||
"fieldname": "advanced_tab",
|
||||
"fieldtype": "Tab Break",
|
||||
"label": "Advanced"
|
||||
},
|
||||
{
|
||||
"fieldname": "password_tab",
|
||||
"fieldtype": "Tab Break",
|
||||
"label": "Password"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_txqh",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"fieldname": "login_methods_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Login Methods"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_uhqk",
|
||||
"fieldtype": "Column Break"
|
||||
}
|
||||
],
|
||||
"icon": "fa fa-cog",
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2023-10-17 16:12:28.145496",
|
||||
"modified": "2023-11-27 14:08:01.927794",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "System Settings",
|
||||
|
|
|
|||
|
|
@ -93,7 +93,6 @@ class SystemSettings(Document):
|
|||
time_zone: DF.Literal
|
||||
two_factor_method: DF.Literal["OTP App", "SMS", "Email"]
|
||||
welcome_email_template: DF.Link | None
|
||||
|
||||
# end: auto-generated types
|
||||
def validate(self):
|
||||
from frappe.twofactor import toggle_two_factor_auth
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue