componentsByKeys.put(component.key(), component);
}
UserSession userSession = UserSession.get();
List<Component> result = Lists.newArrayList();
Collection<String> authorizedProjectKeys = db.authorizationDao().selectAuthorizedRootProjectsKeys(userSession.userId(), UserRole.USER);
for (String key : componentsByKeys.keySet()) {
if (authorizedProjectKeys.contains(key)) {
result.add(componentsByKeys.get(key));
}
}