File: ClassCollection_Overlay.pm

package info (click to toggle)
rtfm 2.0.3-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 812 kB
  • ctags: 220
  • sloc: perl: 3,426; sh: 153; makefile: 144
file content (40 lines) | stat: -rw-r--r-- 567 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
use strict;

package RT::FM::ClassCollection;

no warnings qw/redefine/;


# {{{ sub Next 

=head2 Next

Returns the next Object that this user can see.

=cut

sub Next {
    my $self = shift;


    my $Object = $self->SUPER::Next();
    if ((defined($Object)) and (ref($Object))) {
   if ( $Object->CurrentUserHasRight('SeeClass') ) {
        return($Object);
    }

    #If the user doesn't have the right to show this Object
    else {
        return($self->Next());
    }
    }
    #if there never was any Object
    else {
    return(undef);
    }

}
# }}}


1;