I’m looking for the best way to store my authenticated user’s informations.
Basically is an Ember.Object instance (could be an Ember.ObjectController instance as well) that saves basic user’s informations (id, name, email, etc).
This object has to be reachable from all controllers and routes (to deal with access level and to display user specific informations for example).
Nowadays, I store this object in the App global (something like App.user).
I would like to know what’s your solution and if there is better way to do that. Especially, I’m asking myself if it would be better to store the user in the App._container_ to “legally” access the user from controllers and routes (this.container.user).
Thanks for the information (I’ve updated the code in the example accordingly). I just copied and pasted from an old app that was written before the container was documented. Regardless of API, I still think that using injection is a clean solution to the stated problem, and was really looking for feedback as to whether or not there was a better solution.