Projet

Général

Profil

0001-misc-only-display-strongbox-page-if-it-has-been-enab.patch

Frédéric Péters, 03 mai 2015 18:35

Télécharger (1,15 ko)

Voir les différences:

Subject: [PATCH] misc: only display strongbox page if it has been enabled in
 settings (#7129)

 extra/auquotidien.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
extra/auquotidien.py
35 35
    target = target.strip('/')
36 36
    if target == 'management':
37 37
        target = 'forms'
38
    if target in ('strongbox', ) and not get_publisher().has_site_option(target):
39
        return False
38
    if target == 'strongbox':
39
        if not get_publisher().has_site_option(target):
40
            # strongbox disabled in site-options.cfg
41
            return False
42
        if not get_cfg('misc', {}).get('aq-strongbox'):
43
            # strongbox disabled in settings panel
44
            return False
40 45
    admin_role = get_cfg('aq-permissions', {}).get(target, None)
41 46
    if not admin_role:
42 47
        return False
43
-