def METHOD_NAME(self, action):
    CheckAuthenticator(self.request)
    if not self.available():
        self.status = _(
            "text_not_allowed_manage_server",
            default="You are not allowed to manage the Zope server.",
        )
        return
    try:
        user = '"%s"' % getSecurityManager().getUser().getUserName()
    except Exception:
        user = "unknown user"
    logger.info("Shutdown requested by %s" % user)
    if LIFETIME:
        shutdown(0)
    else:
        raise
    # TODO: returning html has no effect in button handlers
    self.request.response.setHeader("X-Theme-Disabled", "True")
    return """<html><head></head><body>{}</body></html>""".format(
        _("plone_shutdown", default="Zope is shutting down.")
    )