Development
This commit is contained in:
parent
6cfb070b7f
commit
286930423f
7 changed files with 44 additions and 11 deletions
|
|
@ -66,9 +66,17 @@ def auth_mode_save():
|
|||
flash('This authentication mode requires a Routlin Pro license.', 'error')
|
||||
return redirect(f'/{_PAGE}')
|
||||
|
||||
eap_protocol = request.form.get('eap_protocol', 'eap_peap')
|
||||
if eap_protocol not in ('eap_peap', 'eap_ttls', 'eap_md5'):
|
||||
eap_protocol = 'eap_peap'
|
||||
|
||||
cfg = load_config()
|
||||
before = copy.deepcopy(cfg.get('radius', {}).get('options', {}))
|
||||
after = {**before, 'auth_mode': auth_mode}
|
||||
if auth_mode == 'eap_password':
|
||||
after['eap_protocol'] = eap_protocol
|
||||
else:
|
||||
after.pop('eap_protocol', None)
|
||||
cfg.setdefault('radius', {})['options'] = after
|
||||
|
||||
changes = diff_fields(before, after)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue