summaryrefslogtreecommitdiff
path: root/data/templates/pppoe-server/chap-secrets.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-18 11:43:22 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-18 13:25:08 +0200
commitdeed0ceac983359c3c9d27e584dd3ec8e2e18156 (patch)
treec2f97d9b37d7632ea25c2d88bde46cabb36e2196 /data/templates/pppoe-server/chap-secrets.tmpl
parent1795ae2c8aa67ef5d0efec50d31c1ad1917841b2 (diff)
downloadvyos-1x-deed0ceac983359c3c9d27e584dd3ec8e2e18156.tar.gz
vyos-1x-deed0ceac983359c3c9d27e584dd3ec8e2e18156.zip
pppoe-server: T2314: remove boilerplate code and adjust
Diffstat (limited to 'data/templates/pppoe-server/chap-secrets.tmpl')
-rw-r--r--data/templates/pppoe-server/chap-secrets.tmpl10
1 files changed, 5 insertions, 5 deletions
diff --git a/data/templates/pppoe-server/chap-secrets.tmpl b/data/templates/pppoe-server/chap-secrets.tmpl
index 907ac6ed7..dd00d7bd0 100644
--- a/data/templates/pppoe-server/chap-secrets.tmpl
+++ b/data/templates/pppoe-server/chap-secrets.tmpl
@@ -1,10 +1,10 @@
# username server password acceptable local IP addresses shaper
-{% for user in authentication['local-users'] %}
-{% if authentication['local-users'][user]['state'] == 'enabled' %}
-{% if (authentication['local-users'][user]['upload']) and (authentication['local-users'][user]['download']) %}
-{{ "%-12s" | format(user) }} * {{ "%-16s" | format(authentication['local-users'][user]['passwd']) }} {{ "%-16s" | format(authentication['local-users'][user]['ip']) }} {{ authentication['local-users'][user]['download'] }} / {{ authentication['local-users'][user]['upload'] }}
+{% for user in local_users %}
+{% if user.state == 'enabled' %}
+{% if user.upload and user.download %}
+{{ "%-12s" | format(user.name) }} * {{ "%-16s" | format(user.password) }} {{ "%-16s" | format(user.ip) }} {{ user.download }} / {{ user.upload }}
{% else %}
-{{ "%-12s" | format(user) }} * {{ "%-16s" | format(authentication['local-users'][user]['passwd']) }} {{ "%-16s" | format(authentication['local-users'][user]['ip']) }}
+{{ "%-12s" | format(user.name) }} * {{ "%-16s" | format(user.password) }} {{ "%-16s" | format(user.ip) }}
{% endif %}
{% endif %}
{% endfor %}