Mwa ha ha! It was $c->SET_AUTHENTICATED all along! This is how you
switch-user/become-user/super-user inside Catalyst.
Try this on for size:
sub su : Chained('/is_admin') PathPart('su') Args(1) {
my ( $self, $c, $id ) = @_;
my $user_was = $c->user;
my $user_is = $c->find_user({ id =>
Indeed, i think it should login as a new user not changing the actual
session.
maybe something like:
admin clicks "login as joeuser">open a new browser window as admin>verify
its admin and re-login as a new user. register on session user is admin so
he can log back in.
Then add button "terminate s
will trillich wrote on 11/29/2010 05:37 PM:
> Aha! It looks like a sneaky, evil, wrong, mean, horrid way to
> switch-user in the middle of a session is to
>
> $c->session->{__user}{id} = $new_id_here; # since "id" = PK
>
> But that's undoubtedly bad form of the worst kind.
>
> What's the canonic
On Mon, 2010-11-29 at 17:37 -0600, will trillich wrote:
> Aha! It looks like a sneaky, evil, wrong, mean, horrid way to
> switch-user in the middle of a session is to
>
> $c->session->{__user}{id} = $new_id_here; # since "id" = PK
>
> But that's undoubtedly bad form of the worst kind.
>
> What's
Aha! It looks like a sneaky, evil, wrong, mean, horrid way to switch-user in
the middle of a session is to
$c->session->{__user}{id} = $new_id_here; # since "id" = PK
But that's undoubtedly bad form of the worst kind.
What's the canonical non-sneaky above-board friendly golden way to do this?