def _list_projects(source=None):
 project = acl.get_limited_to_project(flask.request.headers)
 if project:
  if source:
   if (project in flask.request.storage_conn.get_projects(source=source)):
    projects = [project]
   else:
    projects = []
  else:
   projects = [project]
 else:
  projects = flask.request.storage_conn.get_projects(source=source)
 return flask.jsonify(projects=list(projects))

def _list_projects ( source = None ) : project = acl . get_limited_to_project ( flask . request . headers ) if project : if source : if ( project in flask . request . storage_conn . get_projects ( source = source ) ) : projects = [ project ] else : projects = [ ] else : projects = [ project ] else : projects = flask . request . storage_conn . get_projects ( source = source ) return flask . jsonify ( projects = list ( projects ) )
return a list of project names .