From 3cc8ade6d8fbbc01761bad13c30acbaee7473899 Mon Sep 17 00:00:00 2001 From: kevgliss Date: Fri, 29 Jan 2016 10:59:04 -0800 Subject: [PATCH] associating new authorities with the owner roles --- lemur/authorities/service.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lemur/authorities/service.py b/lemur/authorities/service.py index 50812b0b..9a7ff6a2 100644 --- a/lemur/authorities/service.py +++ b/lemur/authorities/service.py @@ -101,6 +101,10 @@ def create(kwargs): database.update(cert) authority = database.create(authority) + # the owning dl or role should have this authority associated with it + owner_role = role_service.get_by_name(kwargs['ownerEmail']) + owner_role.authority = authority + g.current_user.authorities.append(authority) return authority