Change-Id: Ia6e8589357b491cefe88101ff74844789059a016
Signed-off-by: Eduardo Sousa <eduardo.sousa@canonical.com>
for project in content["projects"]:
for role in project["roles"]:
- project_role_mappings.append([project, role])
+ project_role_mappings.append({"project": project, "role": role})
del content["projects"]
content["project_role_mappings"] = project_role_mappings
for mapping in mappings_to_remove:
self.auth.remove_role_from_user(
user["name"],
- mapping[0],
- mapping[1]
+ mapping["project"],
+ mapping["role"]
)
for mapping in mappings_to_add:
self.auth.assign_role_to_user(
user["name"],
- mapping[0],
- mapping[1]
+ mapping["project"],
+ mapping["role"]
)
return content["_id"]