[Rt-commit] r14825 - in rt/branches/3.6-EXPERIMENTAL-PAGING: lib/RT
ruz at bestpractical.com
ruz at bestpractical.com
Tue Aug 5 19:49:32 EDT 2008
Author: ruz
Date: Tue Aug 5 19:49:31 2008
New Revision: 14825
Modified:
rt/branches/3.6-EXPERIMENTAL-PAGING/ (props changed)
rt/branches/3.6-EXPERIMENTAL-PAGING/lib/RT/Tickets_Overlay.pm
Log:
r14818 at cubic-pc: cubic | 2008-08-05 03:54:44 +0400
* add FilterRecord method
Modified: rt/branches/3.6-EXPERIMENTAL-PAGING/lib/RT/Tickets_Overlay.pm
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-PAGING/lib/RT/Tickets_Overlay.pm (original)
+++ rt/branches/3.6-EXPERIMENTAL-PAGING/lib/RT/Tickets_Overlay.pm Tue Aug 5 19:49:31 2008
@@ -2739,6 +2739,22 @@
# }}}
+sub FilterRecord {
+ my $self = shift;
+ my $ticket = shift;
+
+ return 1 if !$self->{'allow_deleted_search'}
+ && $ticket->__Value('Status') eq 'deleted';
+
+ # Since Ticket could be granted with more rights instead
+ # of being revoked, it's ok if queue rights allow
+ # ShowTicket. It seems need another query, but we have
+ # rights cache in Principal::HasRight.
+ return 1 unless $ticket->CurrentUserHasRight('ShowTicket');
+
+ return 0;
+}
+
# {{{ sub Next
sub Next {
my $self = shift;
More information about the Rt-commit
mailing list