def has_permission_in_config(config):
    """
    Recursively check if any menu or sub-menu in the configuration is configured with permissions.
    """
    if 'menus' in config:
        for menu in config['menus']:
            if has_permission_in_config(menu):
                return True
    if 'models' in config:
        for model in config['models']:
            if has_permission_in_config(model):
                return True
    if 'permission' in config:
        return True
    return
Recursively check if any menu or sub-menu in the configuration is configured with permissions.
simpleui/templatetags/simpletags.py