mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Renamed privilegedactions to actions.
This commit is contained in:
1 parent
8343946de9
commit
6567dc1758
5 files changed
+14
-14
No files matched your search
@@ -9,7 +9,7 @@ from gettext import gettext as _
|
||||
from filedict import FileDict
|
||||
from modules.auth import require
|
||||
from plugin_mount import PagePlugin, FormPlugin
|
||||
from privilegedactions import privilegedaction_run
|
||||
from actions import superuser_run
|
||||
import cfg
|
||||
from forms import Form
|
||||
from model import User
|
||||
@@ -55,7 +55,7 @@ def set_hostname(hostname):
|
||||
|
||||
cfg.log.info("Changing hostname to '%s'" % hostname)
|
||||
try:
|
||||
privilegedaction_run("hostname-change", hostname)
|
||||
superuser_run("hostname-change", hostname)
|
||||
# don't persist/cache change unless it was saved successfuly
|
||||
sys_store = filedict_con(cfg.store_file, 'sys')
|
||||
sys_store['hostname'] = hostname
|
||||
@@ -141,7 +141,7 @@ class general(FormPlugin, PagePlugin):
|
||||
time_zone = time_zone.strip()
|
||||
if time_zone != sys_store['time_zone']:
|
||||
cfg.log.info("Setting timezone to %s" % time_zone)
|
||||
privilegedaction_run("timezone-change", [time_zone])
|
||||
superuser_run("timezone-change", [time_zone])
|
||||
sys_store['time_zone'] = time_zone
|
||||
return message or "Settings updated."
|
||||
|
||||
Reference in new issue
Block a user