More rigorous session-cleanup for BecomeUser
authorMikal Kolbein Gule <m.k.gule@usit.uio.no>
Tue, 10 Jul 2012 08:30:15 +0000 (10:30 +0200)
committerMikal Kolbein Gule <m.k.gule@usit.uio.no>
Tue, 10 Jul 2012 08:30:15 +0000 (10:30 +0200)
commit8349b8eb2c19cee2551da8979cc861c3ad8fd06c
treef2015d479d3d843ac32fbc0267c336a8a59ba69e
parent4286a352e22268b5be6ce097a5aa976aae92f15d
More rigorous session-cleanup for BecomeUser

Kevin Falcone commented:
> We cheched it out with our become-user-thingie which basically
> does:
> $session{'CurrentUser'}->Load($user);
> delete $session{'my_rt_portlets'};
> $session{'CurrentUser'}->{'_principal_obj'}->{'values'}->{'id'} = $session{'CurrentUser'}->id;

That should be enough to work around the SeeQueue cache, although I'd
probably make the 3rd line just a
delete $session{'CurrentUser}{'_principal_obj'}
and let RT reload the Principal when it needs it. That avoids any
potential "what?" happening.
local/html/Admin/Tools/BecomeUser.html