Development
This commit is contained in:
parent
e37029a066
commit
574a45111d
8 changed files with 164 additions and 110 deletions
|
|
@ -49,14 +49,15 @@ def vlans_addedit():
|
|||
radius_default = 'radius_default' in request.form
|
||||
mdns_reflection = 'mdns_reflection' in request.form
|
||||
dnsmasq_log_queries = 'dnsmasq_log_queries' in request.form
|
||||
restricted_vlan = 'restricted_vlan' in request.form
|
||||
restricted_vlan_raw = request.form.get('restricted_vlan', '').strip()
|
||||
restricted_vlan = restricted_vlan_raw if restricted_vlan_raw in ('q', 'c') else ''
|
||||
use_blocklists = sanitize.filterlist(
|
||||
request.form.getlist('use_blocklists'),
|
||||
{b.get('name') for b in load_config().get('dns_blocking', {}).get('blocklists', [])},
|
||||
)
|
||||
|
||||
if restricted_vlan and not PRO_LICENSE:
|
||||
flash('Restricted VLAN requires a Routlin Pro license.', 'error')
|
||||
flash('Quarantined and Captive Portal VLANs require a Routlin Pro license.', 'error')
|
||||
return redirect(f'/{_PAGE}')
|
||||
|
||||
if not name:
|
||||
|
|
@ -269,8 +270,7 @@ def vlans_addedit():
|
|||
'use_blocklists': use_blocklists,
|
||||
'server_identities': new_identities,
|
||||
})
|
||||
if PRO_LICENSE:
|
||||
existing['restricted_vlan'] = restricted_vlan
|
||||
existing['restricted_vlan'] = restricted_vlan if PRO_LICENSE else ''
|
||||
if dhcp_info:
|
||||
existing['dhcp_information'] = dhcp_info
|
||||
else:
|
||||
|
|
@ -330,8 +330,7 @@ def vlans_addedit():
|
|||
'mdns_reflection': mdns_reflection,
|
||||
'server_identities': new_identities,
|
||||
}
|
||||
if PRO_LICENSE:
|
||||
entry['restricted_vlan'] = restricted_vlan
|
||||
entry['restricted_vlan'] = restricted_vlan if PRO_LICENSE else ''
|
||||
if dhcp_info:
|
||||
entry['dhcp_information'] = dhcp_info
|
||||
if is_vpn:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue