<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: unpriv users... SelfService problems...</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Hooray!  This works!!  Thanks man, now I can finally show the SelfService thing to my users!</FONT>
</P>

<P><FONT SIZE=2>(and yes, I did verify that RT still works for privileged users.  :-) )</FONT>
</P>

<P><FONT SIZE=2>> -----Original Message-----</FONT>
<BR><FONT SIZE=2>> From: moreiras@agestado.com.br [<A HREF="mailto:moreiras@agestado.com.br">mailto:moreiras@agestado.com.br</A>]</FONT>
<BR><FONT SIZE=2>> Sent: Thursday, February 28, 2002 1:35 PM</FONT>
<BR><FONT SIZE=2>> To: rt-users@lists.fsck.com</FONT>
<BR><FONT SIZE=2>> Cc: rickford@ufl.edu; rm@codeon.de; Kendric.Beachey@garmin.com</FONT>
<BR><FONT SIZE=2>> Subject: unpriv users... SelfService problems...</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Hi, </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I was experiencing the following problem:</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> - a unprivileged user was able to login into the</FONT>
<BR><FONT SIZE=2>> system, but all the links at SelfService page seems</FONT>
<BR><FONT SIZE=2>> not working, reopening the same page, even</FONT>
<BR><FONT SIZE=2>> the Logout link...</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I was able to find similar problems in the list</FONT>
<BR><FONT SIZE=2>> but not a clue for a solution... Well, I think</FONT>
<BR><FONT SIZE=2>> that now I'm able to share with the list at least</FONT>
<BR><FONT SIZE=2>> a clue and a work around:</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I found that in the problematic system, the variable:</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>>   $m->base_comp->path</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> have one extra slash (/) in the begining of the </FONT>
<BR><FONT SIZE=2>> string... I don't know why...</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I first thought that was a bug in the version of the </FONT>
<BR><FONT SIZE=2>> Mason library, but that wasn't the case...  I have </FONT>
<BR><FONT SIZE=2>> two instalations of RT 2.0.11 with the same version </FONT>
<BR><FONT SIZE=2>> of the Mason library and one operates</FONT>
<BR><FONT SIZE=2>> correctly and the other with the error...</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Well, to test if it is the case, one can add the</FONT>
<BR><FONT SIZE=2>> following lines to the begining of the <%INIT> section</FONT>
<BR><FONT SIZE=2>> of the autohandler:</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> print STDERR "teste de base_comp ";</FONT>
<BR><FONT SIZE=2>> print STDERR $m->base_comp->path,"\n";</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> then view the result at apache error log: </FONT>
<BR><FONT SIZE=2>> (tail -f /var/log/httpd/error_log)</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> My workaround was to modify two regular expressions</FONT>
<BR><FONT SIZE=2>> in the autohandler:</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> (...)</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> #if it's a noauth file, don't ask for auth.</FONT>
<BR><FONT SIZE=2>>   if ($m->base_comp->path =~ '^//NoAuth/') {</FONT>
<BR><FONT SIZE=2>>           $m->call_next();</FONT>
<BR><FONT SIZE=2>>                 $m->abort();</FONT>
<BR><FONT SIZE=2>>                 }</FONT>
<BR><FONT SIZE=2>> (...)</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>>    # If the user isn\'t privileged, they can only see SelfService</FONT>
<BR><FONT SIZE=2>>        if ((! $session{'CurrentUser'}->Privileged) and</FONT>
<BR><FONT SIZE=2>>                ($m->base_comp->path !~ '^//SelfService/') ) {</FONT>
<BR><FONT SIZE=2>>                      $m->comp('/SelfService/index.html');</FONT>
<BR><FONT SIZE=2>>                              $m->abort();</FONT>
<BR><FONT SIZE=2>>                              </FONT>
<BR><FONT SIZE=2>> (...)</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> -- </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> []'s</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Moreiras.</FONT>
<BR><FONT SIZE=2>> ----------------------------</FONT>
<BR><FONT SIZE=2>> Laboratório - Agência Estado</FONT>
<BR><FONT SIZE=2>> </FONT>
</P>

</BODY>
</HTML>