diff --git a/CHANGELOG.md b/CHANGELOG.md index 9de1ce132..cd69635dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file. - Upstream patch from Debian bug #837206 to fix DB and log file permissions. Also switch to new setup command. - Include module static files in build, required for Debian package build. +- dynamicdns: Allow reading status as non-root. ### Changed - repro: Use firewalld provided SIP services. diff --git a/plinth/modules/dynamicdns/dynamicdns.py b/plinth/modules/dynamicdns/dynamicdns.py index e3249b2e7..599aebaed 100644 --- a/plinth/modules/dynamicdns/dynamicdns.py +++ b/plinth/modules/dynamicdns/dynamicdns.py @@ -215,12 +215,12 @@ def configure(request): def statuspage(request): """Serve the status page.""" - check_nat = actions.run('dynamicdns', ['get-nat']) - last_update = actions.run('dynamicdns', ['get-last-success']) + check_nat = _run(['get-nat']) + last_update = _run(['get-last-success']) no_nat = check_nat.strip() == 'no' nat_unchecked = check_nat.strip() == 'unknown' - timer = actions.run('dynamicdns', ['get-timer']) + timer = _run(['get-timer']) if no_nat: logger.info('Not behind a NAT') @@ -241,7 +241,7 @@ def get_status(): """Return the current status.""" # TODO: use key/value instead of hard coded value list status = {} - output = actions.run('dynamicdns', ['status']) + output = _run(['status']) details = output.split() status['enabled'] = (output.split()[0] == 'enabled')