Skip Menu |

This queue is for tickets about the RTx-BecomeUser CPAN distribution.

Report information
The Basics
Id: 41248
Status: open
Priority: 0/
Queue: RTx-BecomeUser

People
Owner: Nobody in particular
Requestors: jpierce [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.0
Fixed in: (no value)



Subject: Doesn't work in RT 3.8
There's nothing in the logs for warning or higher, one simply ends up logged out when trying to switch users.
--- Admin/Tools/BecomeUser.html~ 2008-02-22 23:08:01.000000000 -0500 +++ Admin/Tools/BecomeUser.html 2009-08-06 21:30:44.000000000 -0400 @@ -61,8 +61,6 @@ $m->comp( '/Elements/SetupSessionCookie', %ARGS ); $session{'CurrentUser'} = RT::CurrentUser->new(); $session{'CurrentUser'}->Load($ARGS{'UserName'}); - $m->redirect($RT::WebURL); - $m->abort(); } else { $users = RT::Users->new($RT::SystemUser); @@ -76,9 +74,11 @@ current_subtab => 'Admin/Tools/BecomeUser.html', Title => $title &> +%if ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'SuperUser')) { + <h2><&|/l&>Select User</&></h2> <form name=BecomeUser action=BecomeUser.html> -<select name="UserName" single size=5> +<select name="UserName" size="5"> %while ( my $User = $users->Next ) { <option <% ($User->Id == $session{'CurrentUser'}->Id) ? "SELECTED" : ''%> %if ($ValueAttribute eq 'id') { @@ -92,6 +92,11 @@ <& /Elements/Submit, Label => loc("Become User")&> </form> + +%} else { +Congratulations, you are now <% $session{'CurrentUser'}->Name %>. +%} + <%args> $ValueAttribute => 'id' </%args>
From: stennie [...] cpan.org
<p>Have attached an updated patch which works with RT 3.8.7:<br /> <br /> &nbsp;- adds required call to&nbsp;RT::Interface::Web::SendSessionCookie();<br /> <br /> &nbsp;- adds LimitToPrivileged for selectable users<br /> <br /> Cheers,<br /> Stephen</p>
Subject: RTx-BecomeUser-1.0.patch
--- html/Admin/Tools/BecomeUser.html~ 2008-02-23 15:08:01.000000000 +1100 +++ html/Admin/Tools/BecomeUser.html 2010-01-07 00:29:33.000000000 +1100 @@ -59,13 +59,14 @@ tied(%session)->delete; } $m->comp( '/Elements/SetupSessionCookie', %ARGS ); + RT::Interface::Web::SendSessionCookie(); $session{'CurrentUser'} = RT::CurrentUser->new(); $session{'CurrentUser'}->Load($ARGS{'UserName'}); - $m->redirect($RT::WebURL); - $m->abort(); + } else { $users = RT::Users->new($RT::SystemUser); + $users->LimitToPrivileged; $users->_DoSearch(); } </%init> @@ -76,9 +77,11 @@ current_subtab => 'Admin/Tools/BecomeUser.html', Title => $title &> +%if ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'SuperUser')) { + <h2><&|/l&>Select User</&></h2> <form name=BecomeUser action=BecomeUser.html> -<select name="UserName" single size=5> +<select name="UserName" size="5"> %while ( my $User = $users->Next ) { <option <% ($User->Id == $session{'CurrentUser'}->Id) ? "SELECTED" : ''%> %if ($ValueAttribute eq 'id') { @@ -92,6 +95,11 @@ <& /Elements/Submit, Label => loc("Become User")&> </form> + +%} else { +Congratulations, you are now <% $session{'CurrentUser'}->Name %>. +%} + <%args> $ValueAttribute => 'id' </%args>
RT-Send-CC: stennie [...] cpan.org
On Wed Jan 06 08:38:41 2010, stennie wrote:
Show quoted text
> <p>Have attached an updated patch which works with RT 3.8.7:<br />
> <br />
> &nbsp;- adds required call
> to&nbsp;RT::Interface::Web::SendSessionCookie();<br />
> <br />
> &nbsp;- adds LimitToPrivileged for selectable users<br />
> <br />
> Cheers,<br />
> Stephen</p>
See http://search.cpan.org/~jpierce/RTx-BecomeUser-1.10_2/

Just because you don't see the use case doesn't mean it's not there.
For instance, you may want to log a piece of information as an unprivileged user.

From: stennie [...] cpan.org
&gt; See http://search.cpan.org/~jpierce/RTx-BecomeUser-1.10_2/ <br /> <br /> Cool! &nbsp;Should add a note on the RT wiki and see if poddar will add you as a co-maintainer so this can be properly released. &nbsp;Unfortunately dev modules don't show up in a default search on CPAN (or as a related version if you aren't a maintainer).<br /> <br /> &gt; Just because you don't see the use case doesn't mean it's not there. <br /> &gt; For instance, you may want to log a piece of information as an unprivileged &nbsp;user. <br /> <br /> No worries. &nbsp;I thought that &quot;unprivileged&quot; meant they couldn't log any information but I'm sure there are different use cases.<br /> <br /> Would be great to split into two separate Tool tab links .. my own use case is that we have hundreds of unprivileged users in our public RT instance so it really doesn't work to load them all into a select box (nor are they interesting for us to view).<br /> <br /> Cheers,<br /> Stephen<br /> <br type="_moz" />
Subject: Re: [rt.cpan.org #41248] Doesn't work in RT 3.8
Date: Wed, 06 Jan 2010 09:54:18 -0500
To: bug-RTx-BecomeUser [...] rt.cpan.org
From: Jerrad Pierce <belg4mit [...] pthbb.org>
Show quoted text
>Should add a note on the RT wiki
Already done. It was announced on the mailing list several times though Show quoted text
>and see if poddar will add you as a >co-maintainer so this can be properly released.
He is MIA, so modules@ will have to grant ACLs, which is a rather tortuous process. Show quoted text
>Unfortunately dev modules don't show up in a default search on CPAN (or as a >related version if you aren't a maintainer).
I am well aware of this -- Free map of local environmental resources: http://CambridgeMA.GreenMap.org -- MOTD on Sweetmorn, the 6th of Chaos, in the YOLD 3176: The Universe is shaped like a banana.