+ @staticmethod
+ def format_on_show(content):
+ """
+ Modifies the content of the role information to separate the role
+ metadata from the role definition.
+ """
+ project_role_mappings = []
+
+ for project in content["projects"]:
+ for role in project["roles"]:
+ project_role_mappings.append({"project": project["_id"], "role": role["_id"]})
+
+ del content["projects"]
+ content["project_role_mappings"] = project_role_mappings
+
+ return content
+