@events.observe("TopNotifications")
def check_for_new_version(request, include_all):
    from modoboa.core.utils import check_for_updates

    if not request.user.is_superuser:
        return []
    status, extensions = check_for_updates(request)
    if not status:
        return [{"id": "newversionavailable"}] if include_all else []
    return [{
        "id": "newversionavailable",
        "url": reverse("core:index") + "#info/",
        "text": _("One or more updates are available"),
        "level": "info",
    }]
Check if a new version of Modoboa is available.
dataset/ETHPy150Open tonioo/modoboa/modoboa/core/__init__.py/check_for_new_version