[Rt-commit] [svn] r1953 - in rt/branches/3.3-TESTING: . lib/RT
jesse at pallas.eruditorum.org
jesse at pallas.eruditorum.org
Fri Dec 3 17:25:08 EST 2004
Author: jesse
Date: Fri Dec 3 17:25:07 2004
New Revision: 1953
Modified:
rt/branches/3.3-TESTING/ (props changed)
rt/branches/3.3-TESTING/lib/RT/Transaction_Overlay.pm
Log:
r9447 at tinbook: jesse | 2004-12-03T22:23:11.115990Z
RT-Ticket: 6291
RT-Status: resolved
RT-Update: correspond
Altered Transaction->Value to only show data about custom field transactions if the user
has the right to see that custom field. This automatically limits the Transaction list
to exclude custom field transactions the user shouldn't see.
Modified: rt/branches/3.3-TESTING/lib/RT/Transaction_Overlay.pm
==============================================================================
--- rt/branches/3.3-TESTING/lib/RT/Transaction_Overlay.pm (original)
+++ rt/branches/3.3-TESTING/lib/RT/Transaction_Overlay.pm Fri Dec 3 17:25:07 2004
@@ -770,20 +770,8 @@
sub _OverlayAccessible {
{
- id => { read => 1, type => 'int(11)', default => '' },
- EffectiveTicket =>
- { read => 1, write => 1, type => 'int(11)', default => '' },
- Ticket =>
- { read => 1, public => 1, type => 'int(11)', default => '' },
- TimeTaken => { read => 1, type => 'int(11)', default => '' },
- Type => { read => 1, type => 'varchar(20)', default => '' },
- Field => { read => 1, type => 'varchar(40)', default => '' },
- OldValue => { read => 1, type => 'varchar(255)', default => '' },
- NewValue => { read => 1, type => 'varchar(255)', default => '' },
- Data => { read => 1, type => 'varchar(100)', default => '' },
- Creator => { read => 1, auto => 1, type => 'int(11)', default => '' },
- Created =>
- { read => 1, auto => 1, type => 'datetime', default => '' },
+ ObjectType => { public => 1},
+ ObjectId => { public => 1},
}
};
@@ -840,6 +828,13 @@
}
}
+ # Make sure the user can see the custom field before showing that it changed
+ elsif ( ( $self->__Value('Type') eq 'CustomField' ) && $self->__Value('Field') ) {
+ my $cf = RT::CustomField->new( $self->CurrentUser );
+ $cf->Load( $self->__Value('Field') );
+ return (undef) unless ( $cf->CurrentUserHasRight('SeeCustomField') );
+ }
+
#if they ain't got rights to see, don't let em
else {
More information about the Rt-commit
mailing list