 
   showTasks: ->
     @updateView(view: 'task')
-
 
   updateUser: ->
     userState = User.status(@props.collectionUUID)


  getAllowedView: (userInfo) ->
    {defaultView} = @props

    if not userInfo.isLoaded
      authLevel = 0
    else if not userInfo.isRegistered or userInfo.isRegistationPending
      authLevel = 1
    else if not userInfo.isLoggedIn
      authLevel = 2
    else if not userInfo.isRegistered
      authLevel = 3
    else
      authLevel = 4

    view = VIEWS[authLevel]



# TODO Move this and auth logic to user model
# These views are used with an authLevel (0, 1, 2, or 3) to determine what views the user is allowed to see.
VIEWS = ['loading', 'login', 'registration', ['task', 'progress', 'profile', 'dashboard', 'registration'], 'logout']

ConceptCoach = React.createClass
  displayName: 'ConceptCoach'
