Merge "Use new tenant project index for config references" into feature/zuulv3
diff --git a/zuul/configloader.py b/zuul/configloader.py
index 6b8c4f6..304005c 100644
--- a/zuul/configloader.py
+++ b/zuul/configloader.py
@@ -355,10 +355,7 @@
         if allowed_projects:
             allowed = []
             for p in as_list(allowed_projects):
-                # TODOv3(jeblair): this limits allowed_projects to the same
-                # source; we should remove that limitation.
-                source = job.source_context.project.connection_name
-                (trusted, project) = tenant.getRepo(source, p)
+                (trusted, project) = tenant.getProject(p)
                 if project is None:
                     raise Exception("Unknown project %s" % (p,))
                 allowed.append(project.name)
@@ -394,14 +391,12 @@
     def _makeZuulRole(tenant, job, role):
         name = role['zuul'].split('/')[-1]
 
-        # TODOv3(jeblair): this limits roles to the same
-        # source; we should remove that limitation.
-        source = job.source_context.project.connection_name
-        (trusted, project) = tenant.getRepo(source, role['zuul'])
+        (trusted, project) = tenant.getProject(role['zuul'])
         if project is None:
             return None
 
-        return model.ZuulRole(role.get('name', name), source,
+        return model.ZuulRole(role.get('name', name),
+                              project.connection_name,
                               project.name, trusted)