Fixing an issue were authorities were not related to their roles (#342)
This commit is contained in:
parent
72e3fb5bfe
commit
acd47d5ec9
|
@ -158,12 +158,9 @@ def get_authority_role(ca_name):
|
||||||
:param ca_name:
|
:param ca_name:
|
||||||
"""
|
"""
|
||||||
if g.current_user.is_admin:
|
if g.current_user.is_admin:
|
||||||
authority = get_by_name(ca_name)
|
return role_service.get_by_name("{0}_admin".format(ca_name))
|
||||||
# TODO we should pick admin ca roles for admin
|
|
||||||
return authority.roles[0]
|
|
||||||
else:
|
else:
|
||||||
authority = get_by_name(ca_name)
|
return role_service.get_by_name("{0}_operator".format(ca_name))
|
||||||
return authority.roles[1]
|
|
||||||
|
|
||||||
|
|
||||||
def render(args):
|
def render(args):
|
||||||
|
|
Loading…
Reference in New Issue