Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Devel

RT setting of allowed home page components partially ignored.

 

 

Request Tracker devel RSS feed   Index | Next | Previous | View Threaded


smithj4 at bnl

Oct 12, 2009, 12:44 PM

Post #1 of 2 (227 views)
Permalink
RT setting of allowed home page components partially ignored.

I was trying to modify the RT config setting $HomepageComponents to
remove the QuickCreate option, but it wasn't working. Looking at the
Elements/MyRT code, I see a comment that seems to explain why:

66 # XXX: we don't use this, but should.
67 my %allowed_components = map {$_ => 1} @{RT->Config->Get('HomepageComponents')};

I copied this to my local dir to test out a modification to make this
work, see attached patch. It seems to work for me, but maybe you had
another idea on how to fix this? I checked 3.8.6rc1 and this hasn't
been fixed yet.

~Jason


--
/------------------------------------------------------------------\
| Jason A. Smith Email: smithj4[at]bnl.gov |
| Atlas Computing Facility, Bldg. 510M Phone: +1-631-344-4226 |
| Brookhaven National Lab, P.O. Box 5000 Fax: +1-631-344-7616 |
| Upton, NY 11973-5000, U.S.A. |
\------------------------------------------------------------------/
Attachments: rt3-allowed_components.patch (0.49 KB)
  smime.p7s (3.81 KB)


jesse at bestpractical

Oct 13, 2009, 6:41 AM

Post #2 of 2 (205 views)
Permalink
Re: RT setting of allowed home page components partially ignored. [In reply to]

Jason,

Thanks for the patch. I've bounced this into RT for us to have a look at
as part of RT 3.8.7.

Best,
Jesse


On Mon, Oct 12, 2009 at 03:44:31PM -0400, Jason A. Smith wrote:
> I was trying to modify the RT config setting $HomepageComponents to
> remove the QuickCreate option, but it wasn't working. Looking at the
> Elements/MyRT code, I see a comment that seems to explain why:
>
> 66 # XXX: we don't use this, but should.
> 67 my %allowed_components = map {$_ => 1} @{RT->Config->Get('HomepageComponents')};
>
> I copied this to my local dir to test out a modification to make this
> work, see attached patch. It seems to work for me, but maybe you had
> another idea on how to fix this? I checked 3.8.6rc1 and this hasn't
> been fixed yet.
>
> ~Jason
>
>
> --
> /------------------------------------------------------------------\
> | Jason A. Smith Email: smithj4[at]bnl.gov |
> | Atlas Computing Facility, Bldg. 510M Phone: +1-631-344-4226 |
> | Brookhaven National Lab, P.O. Box 5000 Fax: +1-631-344-7616 |
> | Upton, NY 11973-5000, U.S.A. |
> \------------------------------------------------------------------/
>

> --- /usr/share/rt3/html/Elements/MyRT 2009-09-25 15:12:32.000000000 -0400
> +++ /usr/local/lib/rt3/html/Elements/MyRT 2009-10-12 14:40:18.000000000 -0400
> @@ -88,7 +88,7 @@
> my $entry = shift;
> my $type = $entry->{type};
> my $name = $entry->{'name'};
> - if ( $type eq 'component' ) {
> + if ( $type eq 'component' and $allowed_components{$name} ) {
> # XXX: security check etc.
> $m->comp( $name, %{ $entry->{arguments} || {} } );
> } elsif ( $type eq 'system' ) {




> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel


--
_______________________________________________
List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

Request Tracker devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.