I have an application with a sidebar which is always visible. For this sidebar I have to load common data once. This is usually not a problem, I do this in the setupController hook of the ApplicationRoute.
Tedian.ApplicationRoute = Ember.Route.extend
setupController: ->
controller = @controllerFor("sidebar")
controller.set "tasks", @store.find("task")
controller.set "projects", @store.find("project")
controller.set "timeEntries", @store.find("timeEntry")
Tedian.TimeEntry.findActive().then (timeEntry) ->
controller.set "activeTimeEntry", timeEntry
But where do I put this setup code in an application with authentication?
I don't want to run this code for an un-authenticated user so I can't put it into the ApplicationRoute. Where is the best place to put it instead?