title: Best practice for storing globally required objects in GWT
body: <p>I am starting to develop a GWT application in MVP style (GWTP) and which uses Spring security for authentication and authorization on server side.</p>
  
  <p>In many views of the application, I have to enable or disable controls with respect to a granted authority of the current user. I already have an RPC service which provides access to a userDetailsDto containing all the necessary information.</p>
  
  <p>Now my question: What is the best place to store the user DTO on client side?</p>
  
  <p>Since the user rights are relevant in many presenters, I would have to pass it around everywhere. Alternatively, I could set an RPC service instance in every presenter and requets the user details each time (probably cached on client-side). But i don't like the idea of having a user RPC service in each presenter just for this purpose.</p>
  
  <p>To be honest, I'd rather would prefer a central registry where to put the UserDetails object and which is accessable from anywhere in my app. Is there already such a registry in GWT?</p>
  
  <p>As in my example, you might often be confronted with horizontally used objects. How to deal with them in GWT?</p>