       .then (pages) =>
         @setState {pages}
 
-  getAllWorkflows: (project) ->
+  getAllWorkflows: (project, query = { active: true }) ->
     @setState { loadingSelectedWorkflow: true }
-
-    getWorkflowsInOrder(project, { active: true })
+    getWorkflowsInOrder(project, query)
       .then (activeWorkflows) =>
         @setState { activeWorkflows }
       .then =>

      @context.geordi?.remember projectToken: nextProps.project?.slug

    # Only call to get workflow if we know if there is a user or not and the project is finished loading
    if nextContext.initialLoadComplete and not nextProps.loading and nextProps.preferences and @state.activeWorkflows.length is 0
      @getAllWorkflows(nextProps.project)

    if nextProps.preferences?.preferences? and @state.selectedWorkflow?
      if nextProps.preferences?.preferences.selected_workflow isnt @state.selectedWorkflow.id


  redirectClassifyLink: (redirect) ->
    "#{redirect.replace(/\/?#?\/+$/, "")}/#/classify"

  checkUserRoles: (project, user) ->
    getUserRoles = project.get('project_roles', user_id: user.id)
      .then ([userRoles]) =>
        userRoles.roles
      .catch =>
        []

    getUserRoles.then (userRoles) =>
      isAdmin() or 'owner' in userRoles or 'collaborator' in userRoles

  render: ->
    projectPath = "/projects/#{@props.project.slug}"
