X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fadmin_topics.py;h=de0ad1f4fbe965ccb88dfffb9d42855120b49b43;hp=fa75853d394aa64377f83090486a96b0d3ff043a;hb=HEAD;hpb=f2af4a100d308e07f355d61b94fb27d1ccc97aa2 diff --git a/osm_nbi/admin_topics.py b/osm_nbi/admin_topics.py index fa75853..de0ad1f 100644 --- a/osm_nbi/admin_topics.py +++ b/osm_nbi/admin_topics.py @@ -345,7 +345,6 @@ class CommonVimWimSdn(BaseTopic): schema_version ) or self.config_to_encrypt.get("default") if edit_content.get("config") and config_to_encrypt_keys: - for p in config_to_encrypt_keys: if edit_content["config"].get(p): final_content["config"][p] = self.db.encrypt( @@ -441,7 +440,7 @@ class CommonVimWimSdn(BaseTopic): # remove reference from project_read if there are more projects referencing it. If it last one, # do not remove reference, but order via kafka to delete it - if session["project_id"] and session["project_id"]: + if session["project_id"]: other_projects_referencing = next( ( p @@ -1001,6 +1000,8 @@ class UserTopicAuth(UserTopic): or indata.get("project_role_mappings") or indata.get("projects") or indata.get("add_projects") + or indata.get("unlock") + or indata.get("renew") ): return _id if indata.get("project_role_mappings") and ( @@ -1074,7 +1075,6 @@ class UserTopicAuth(UserTopic): mapping["role"], mapping["role_name"], ): - if mapping in mappings_to_remove: # do not remove mappings_to_remove.remove(mapping) break # do not add, it is already at user @@ -1124,6 +1124,9 @@ class UserTopicAuth(UserTopic): "old_password": indata.get("old_password"), "add_project_role_mappings": mappings_to_add, "remove_project_role_mappings": mappings_to_remove, + "system_admin_id": indata.get("system_admin_id"), + "unlock": indata.get("unlock"), + "renew": indata.get("renew"), } ) data_to_send = {"_id": _id, "changes": indata}