[Rt-devel] RT setting of allowed home page components partially ignored.

Jesse Vincent jesse at bestpractical.com
Tue Oct 13 09:41:39 EDT 2009


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


-- 


More information about the Rt-devel mailing list