+ # get ids of role system_admin and test project
+ role_system_admin = self.db.get_one("roles", {"name": "system_admin"}, fail_on_empty=False)
+ if role_system_admin:
+ self.system_admin_role_id = role_system_admin["_id"]
+ test_project_name = self.config["authentication"].get("project_not_authorized", "admin")
+ test_project = self.db.get_one("projects", {"name": test_project_name}, fail_on_empty=False)
+ if test_project:
+ self.test_project_id = test_project["_id"]
+