1 #$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Queues.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
5 RT::Queues - a collection of RT::Queue objects
19 ok (require RT::TestHarness);
20 ok (require RT::Queues);
28 @ISA= qw(RT::EasySearch);
34 $self->{'table'} = "Queues";
35 $self->{'primary_key'} = "id";
37 # By default, order by name
38 $self->OrderBy( ALIAS => 'main',
42 return ($self->SUPER::_Init(@_));
50 A subclass of DBIx::SearchBuilder::_DoSearch that makes sure that _Disabled rows never get seen unless
51 we're explicitly trying to see them.
58 #unless we really want to find disabled rows, make sure we\'re only finding enabled ones.
59 unless($self->{'find_disabled_rows'}) {
60 $self->LimitToEnabled();
63 return($self->SUPER::_DoSearch(@_));
73 my %args = ( ENTRYAGGREGATOR => 'AND',
75 $self->SUPER::Limit(%args);
85 $item = new RT::Queue($self->CurrentUser);
94 Returns the next queue that this user can see.
102 my $Queue = $self->SUPER::Next();
103 if ((defined($Queue)) and (ref($Queue))) {
105 if ($Queue->CurrentUserHasRight('SeeQueue')) {
109 #If the user doesn't have the right to show this queue
111 return($self->Next());
114 #if there never was any queue