[rt-users] Re: adding new rights to $RIGHTS
Boldra
paul at boldra.com
Tue Jun 27 10:51:11 EDT 2006
Thanks very much Mark, my problem wasn't the use vars, but the
population of $RT::ACE::LOWERCASERIGHTNAMES
I really appreciate your help!
Paul Boldra
Mark A Bentley wrote:
> On Tue, 27 Jun 2006, Boldra wrote:
>> Hi, I'm trying to add new rights in rt 3.5.6 and hitting a problem;
>> Although the new right appears in the UI, when I try to assign it, I
>> get "System error. Right not granted".
>>
>
> I had the same problem in 3.4.5, but I think it was because I was missing
> a bit of code in my Queue_Local.pm. Here's my lib/RT/Queue_Local.pm
> which
> I've tested, and works now:
>
> package RT::Queue;
>
> use strict;
> no warnings qw(redefine);
>
> use vars qw( $RIGHTS );
>
> $RIGHTS = {
> Bentlema => 'Bentlema is testing',
> %{$RIGHTS}
> };
>
> foreach my $right ( keys %{$RIGHTS} ) {
> $RT::ACE::LOWERCASERIGHTNAMES{ lc $right } = $right;
> }
>
> 1;
>
> Previously I didn't have the 'use vars' line in there, nor the
> 'foreach' at the
> end. After adding those two bits of code, things work as expected.
>
> Mark
>
>
More information about the rt-users
mailing list