Fix bug 2150 to encrypt correct WIM account password field and check WIM accounts.
[osm/NBI.git] / osm_nbi / admin_topics.py
index 51a6963..b695693 100644 (file)
@@ -442,7 +442,6 @@ class CommonVimWimSdn(BaseTopic):
                 }
                 content["resources"] = {"compute": compute, "storage": storage, "network": network}
 
-
         return "{}:0".format(content["_id"])
 
     def delete(self, session, _id, dry_run=False, not_send_msg=None):
@@ -569,7 +568,7 @@ class WimAccountTopic(CommonVimWimSdn):
     schema_new = wim_account_new_schema
     schema_edit = wim_account_edit_schema
     multiproject = True
-    password_to_encrypt = "wim_password"
+    password_to_encrypt = "password"
     config_to_encrypt = {}
 
 
@@ -1145,6 +1144,7 @@ class UserTopicAuth(UserTopic):
                     "_id": _id,
                     "username": indata.get("username"),
                     "password": indata.get("password"),
+                    "old_password": indata.get("old_password"),
                     "add_project_role_mappings": mappings_to_add,
                     "remove_project_role_mappings": mappings_to_remove,
                 }