mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
Merge pull request #21 from petterreinholdtsen/nonexpert-config-feedback
Give sensible feedback for non-expert users visiting system/configure.
This commit is contained in:
commit
702bc2292b
@ -65,10 +65,6 @@ class general(FormPlugin, PagePlugin):
|
||||
order = 30
|
||||
|
||||
def help(self, *args, **kwargs):
|
||||
|
||||
## only expert users are going to get deep enough to see any timestamps
|
||||
if not cfg.users.expert():
|
||||
return ''
|
||||
return _(#"""<strong>Time Zone</strong>
|
||||
"""<p>Set your timezone to get accurate
|
||||
timestamps. %(product)s will use this information to set your
|
||||
@ -76,6 +72,9 @@ class general(FormPlugin, PagePlugin):
|
||||
""" % {'product':cfg.product_name, 'box':cfg.box_name})
|
||||
|
||||
def main(self, message='', **kwargs):
|
||||
if not cfg.users.expert():
|
||||
return '<p>' + _('Only members of the expert group are allowed to see and modify the system setup.') + '</p>'
|
||||
|
||||
sys_store = filedict_con(cfg.store_file, 'sys')
|
||||
hostname = cfg.exmachina.augeas.get("/files/etc/hostname/*")
|
||||
# this layer of persisting configuration in sys_store could/should be
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user