autocapture en wifi uniquement
This commit is contained in:
parent
d1ac9ec8eb
commit
f902031871
1 changed files with 8 additions and 9 deletions
17
auth.py
17
auth.py
|
@ -208,15 +208,6 @@ def post_auth(data):
|
||||||
user = data_from_api2["user"]
|
user = data_from_api2["user"]
|
||||||
user_interface = data_from_api2["user_interface"]
|
user_interface = data_from_api2["user_interface"]
|
||||||
|
|
||||||
result, log = check_user_machine_and_register(
|
|
||||||
nas_type, user, user_interface, nas, username, mac)
|
|
||||||
|
|
||||||
logger.info(log.encode("utf-8"))
|
|
||||||
logger.info(username.encode("utf-8"))
|
|
||||||
|
|
||||||
if not result:
|
|
||||||
return radiusd.RLM_MODULE_REJECT
|
|
||||||
|
|
||||||
# If proxified request
|
# If proxified request
|
||||||
if not nas_type:
|
if not nas_type:
|
||||||
logger.info("Proxified request, nas unknown")
|
logger.info("Proxified request, nas unknown")
|
||||||
|
@ -263,6 +254,14 @@ def post_auth(data):
|
||||||
|
|
||||||
# Else it is from wifi
|
# Else it is from wifi
|
||||||
else:
|
else:
|
||||||
|
result, log = check_user_machine_and_register(
|
||||||
|
nas_type, user, user_interface, nas, username, mac)
|
||||||
|
|
||||||
|
logger.info(log.encode("utf-8"))
|
||||||
|
logger.info(username.encode("utf-8"))
|
||||||
|
|
||||||
|
if not result:
|
||||||
|
return radiusd.RLM_MODULE_REJECT
|
||||||
return radiusd.RLM_MODULE_OK
|
return radiusd.RLM_MODULE_OK
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue