From 1615b7818b5b6d8936702c2d8d397efcffe1c5ea Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Wed, 11 Sep 2013 20:13:46 +0200 Subject: [PATCH] Give sensible feedback for non-expert users visiting system/configure. Explain that only expert users get access, instead of only showing an title. --- modules/installed/system/config.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/installed/system/config.py b/modules/installed/system/config.py index b671fcc12..bc27c878c 100644 --- a/modules/installed/system/config.py +++ b/modules/installed/system/config.py @@ -62,10 +62,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 _(#"""Time Zone """

Set your timezone to get accurate timestamps. %(product)s will use this information to set your @@ -73,6 +69,9 @@ class general(FormPlugin, PagePlugin): """ % {'product':cfg.product_name, 'box':cfg.box_name}) def main(self, message='', **kwargs): + if not cfg.users.expert(): + return '

' + _('Only members of the expert group are allowed to see and modify the system setup.') + '

' + 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