[minor] remove 2fa from setup wizar
This commit is contained in:
parent
c8e04b3de0
commit
c63cdc5adf
2 changed files with 0 additions and 34 deletions
|
|
@ -561,36 +561,6 @@ var frappe_slides = [
|
|||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
//Two Factor Select
|
||||
name:'twofactor',
|
||||
domains: ["all"],
|
||||
title: __("Two Factor Authentication"),
|
||||
icon: "fa fa-flag",
|
||||
help: __("Setup Two Factor Authentication For Users"),
|
||||
fields: [
|
||||
{ fieldname: "twofactor_enable", label: __("Enable Two Factor Authentication"),
|
||||
fieldtype: "Check"},
|
||||
{ fieldtype: "Section Break" },
|
||||
{ fieldname: "twofactor_method", label: __("Select Authentication Method"),
|
||||
fieldtype: "Select"}
|
||||
],
|
||||
onload:function(slide){
|
||||
slide.form.fields_dict.twofactor_method.df.options = ['SMS','Email','OTP App']
|
||||
slide.form.fields_dict.twofactor_method.$wrapper.css('display','none');
|
||||
slide.get_input('twofactor_enable').change(function(){
|
||||
slide.form.fields_dict.twofactor_method.$wrapper.toggle();
|
||||
if(this.checked){
|
||||
slide.form.fields_dict.twofactor_method.df.reqd = 1;
|
||||
}
|
||||
else{
|
||||
slide.form.fields_dict.twofactor_method.df.reqd = 0;
|
||||
}
|
||||
slide.form.fields_dict.twofactor_method.refresh();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ from frappe.translate import (set_default_language, get_dict, send_translations)
|
|||
from frappe.geo.country_info import get_country_info
|
||||
from frappe.utils.file_manager import save_file
|
||||
from frappe.utils.password import update_password
|
||||
from frappe.twofactor import toggle_two_factor_auth
|
||||
from werkzeug.useragents import UserAgent
|
||||
import install_fixtures
|
||||
|
||||
|
|
@ -79,9 +78,6 @@ def update_system_settings(args):
|
|||
'enable_scheduler': 1 if not frappe.flags.in_test else 0,
|
||||
'backup_limit': 3 # Default for downloadable backups
|
||||
})
|
||||
if args.get("twofactor_enable") == 1:
|
||||
toggle_two_factor_auth(True, roles=['All'])
|
||||
system_settings.two_factor_method = args.get('twofactor_method')
|
||||
system_settings.save()
|
||||
|
||||
def update_user_name(args):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue