misc: only display strongbox page if it has been enabled in settings (#7129)
This commit is contained in:
parent
c9a827b5c2
commit
dc027d89c1
|
@ -35,8 +35,13 @@ def check_visibility(target):
|
||||||
target = target.strip('/')
|
target = target.strip('/')
|
||||||
if target == 'management':
|
if target == 'management':
|
||||||
target = 'forms'
|
target = 'forms'
|
||||||
if target in ('strongbox', ) and not get_publisher().has_site_option(target):
|
if target == 'strongbox':
|
||||||
return False
|
if not get_publisher().has_site_option(target):
|
||||||
|
# strongbox disabled in site-options.cfg
|
||||||
|
return False
|
||||||
|
if not get_cfg('misc', {}).get('aq-strongbox'):
|
||||||
|
# strongbox disabled in settings panel
|
||||||
|
return False
|
||||||
admin_role = get_cfg('aq-permissions', {}).get(target, None)
|
admin_role = get_cfg('aq-permissions', {}).get(target, None)
|
||||||
if not admin_role:
|
if not admin_role:
|
||||||
return False
|
return False
|
||||||
|
|
Reference in New Issue