From acd47d5ec9a154359234d65d6fecaf709bf0f181 Mon Sep 17 00:00:00 2001 From: kevgliss Date: Thu, 2 Jun 2016 09:07:17 -0700 Subject: [PATCH] Fixing an issue were authorities were not related to their roles (#342) --- lemur/authorities/service.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lemur/authorities/service.py b/lemur/authorities/service.py index d74fc4d7..43e31421 100644 --- a/lemur/authorities/service.py +++ b/lemur/authorities/service.py @@ -158,12 +158,9 @@ def get_authority_role(ca_name): :param ca_name: """ if g.current_user.is_admin: - authority = get_by_name(ca_name) - # TODO we should pick admin ca roles for admin - return authority.roles[0] + return role_service.get_by_name("{0}_admin".format(ca_name)) else: - authority = get_by_name(ca_name) - return authority.roles[1] + return role_service.get_by_name("{0}_operator".format(ca_name)) def render(args):