From 90f4b458e31fce417c5d5921a130f97ebf4ddf3f Mon Sep 17 00:00:00 2001 From: kevgliss Date: Fri, 29 Sep 2017 14:07:40 -0700 Subject: [PATCH] Adding the lemur identity to be able to re-issue certificates. (#949) --- lemur/certificates/cli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lemur/certificates/cli.py b/lemur/certificates/cli.py index 630329fa..1a386ce0 100644 --- a/lemur/certificates/cli.py +++ b/lemur/certificates/cli.py @@ -10,6 +10,7 @@ import sys from flask import current_app from flask_script import Manager +from flask_principal import Identity, identity_changed from lemur import database from lemur.extensions import sentry @@ -122,6 +123,9 @@ def request_reissue(certificate, commit): :param commit: :return: """ + # set the lemur identity for all cli commands + identity_changed.send(current_app._get_current_object(), identity=Identity(1)) + details = get_certificate_primitives(certificate) print_certificate_details(details)