CC: | andrey.kokarev [...] e-port.ru |
Subject: | Bug in RTx-RightsMatrix-0.03.00 |
Date: | Wed, 13 Feb 2008 22:30:51 +0300 |
To: | bug-RTx-RightsMatrix [...] rt.cpan.org |
From: | Boris Lytochkin <boris.lytochkin [...] e-port.ru> |
When user do not have SuperUser privileges, trying to get Preferences-My Rights-Queue Rights
fails whith error about uninitialized value of $equiv_group in RightsMatrix.pm, line 77
Patch to fix this bug:
Show quoted text
>diff -au ~/RTx-RightsMatrix-0.03.00/lib/RTx/RightsMatrix.pm RightsMatrix.pm
--- /home/boris/RTx-RightsMatrix-0.03.00/lib/RTx/RightsMatrix.pm Tue Apr 4 23:56:52 2006
+++ RightsMatrix.pm Wed Feb 13 22:22:22 2008
@@ -69,7 +69,7 @@
#$acl->Limit( FIELD => 'ObjectId', VALUE => 0, ENTRYAGGREGATOR => 'OR' ) if ref($args{Object}) =~ /RT::System/;
if ($self->IsUser) {
- my $groups = RT::Groups->new($cu);
+ my $groups = RT::Groups->new($RT::SystemUser);
$groups->Limit(FIELD => 'Instance', VALUE => $self->id);
$groups->Limit(FIELD => 'Domain', VALUE => 'ACLEquivalence');
my $equiv_group = $groups->First;
Bug is reproduced with both DBIx-SearchBuilder-1.50 and DBIx-SearchBuilder-1.51
--
Boris Lytochkin,
JSC e-port, Moscow.