//
// Session Tool start right at the session once the user has been set
// while persistent and authorized Tools are started when the user has
// logged in
//
User user = data.getUser();
// Note: Session tools are currently lost after the login action
// because the anonymous user is replaced the the real user object.
// We should either store the session pull tools in the session or
// make Turbine.loginAction() copy the session pull tools into the
// new user object.
populateWithSessionTools(sessionTools, context, data, user);
if (!TurbineSecurity.isAnonymousUser(user))
{
if (user.hasLoggedIn())
{
populateWithSessionTools(authorizedTools, context, data, user);
populateWithPermTools(persistentTools, context, data, user);
}
}