From e64e2a41d512f9b19f8ffb2ecdf649841a16569b Mon Sep 17 00:00:00 2001 From: Mathias Petermann Date: Wed, 23 Sep 2020 16:36:59 +0200 Subject: [PATCH] Add update_options to authorities service --- lemur/authorities/service.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lemur/authorities/service.py b/lemur/authorities/service.py index c70c6fc5..c734f408 100644 --- a/lemur/authorities/service.py +++ b/lemur/authorities/service.py @@ -39,6 +39,21 @@ def update(authority_id, description, owner, active, roles): return database.update(authority) +def update_options(authority_id, options): + """ + Update an authority with new options. + + :param authority_id: + :param options: the new options to be saved into the authority + :return: + """ + + authority = get(authority_id) + + authority.options = options + + return database.update(authority) + def mint(**kwargs): """ Creates the authority based on the plugin provided.