Hi, here's a quick hack that should allow unprivileged users to use the "Simple Search" page. First copy 3 files as follows: # mkdir -p /your/rt/location/local/html/SelfService/Search # mkdir /your/rt/location/local/html/Elements # cp /your/rt/location/share/html/Search/Simple.html /your/rt/location/local/html/SelfService/Search/ # cp /your/rt/location/share/html/Search/Results.html /your/rt/location/local/html/SelfService/Search/ # cp /your/rt/location/share/html/Elements/Tabs /your/rt/location/local/html/Elements/
Then download and apply the attached patches: # patch /your/rt/location/local/html/SelfService/Search/Simple.html -i ./simple.txt # patch /your/rt/location/local/html/SelfService/Search/Results.html -i ./results.txt # patch /your/rt/location/local/html/Elements/Tabs -i ./tabs.txt Restart the web server. Now the unprivileged users should be able to search through the tickets visible to them. Best regards, Iulian
88a90,96 > # Iulian, stolen from MyRequests > my $id = $session{'CurrentUser'}->id; > my @roles = qw(Requestor Cc AdminCc Watcher); > my $Query .= " AND ( " > . join( ' OR ', map "$_.id = $id", @roles) > . ")"; >
763a764,765 > #add "Simple Search" to SelfService: > $tickets->child( search => title => loc('Simple Search'), path => > '/SelfService/Search/Simple.html', );
83c83 < $Format ||= $prefs->{'Format'} || RT->Config->Get('DefaultSearchResultFormat'); --- > $Format ||= RT->Config->Get('DefaultSelfServiceSearchResultFormat'); 100a101,110 > #limit to visible tickets (stolen from MyRequests) > if($Query){ > my $id = $session{'CurrentUser'}->id; > my @roles = qw(Requestor Cc AdminCc Watcher); > $Query .= " AND ( " > . join( ' OR ', map "$_.id = $id", @roles) > . ")"; > } > >
-------- RT Training Sessions (http://bestpractical.com/services/training.html) * Boston March 5 & 6, 2012