ACL.pm 3.61 KB
Newer Older
1
# BEGIN BPS TAGGED BLOCK {{{
Jesse Vincent's avatar
Jesse Vincent committed
2
# 
3
# COPYRIGHT:
Jesse Vincent's avatar
Jesse Vincent committed
4
5
# 
# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC
6
#                                          <jesse@bestpractical.com>
Jesse Vincent's avatar
Jesse Vincent committed
7
# 
8
9
10
11
# (Except where explicitly superseded by other copyright notices)
# 
# 
# LICENSE:
Jesse Vincent's avatar
Jesse Vincent committed
12
13
14
15
# 
# This work is made available to you under the terms of Version 2 of
# the GNU General Public License. A copy of that license should have
# been provided with this software, but in any event can be snarfed
16
# from www.gnu.org.
Jesse Vincent's avatar
Jesse Vincent committed
17
18
19
20
21
22
# 
# This work is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
# 
23
24
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
Jesse Vincent's avatar
Jesse Vincent committed
25
26
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 or visit their web page on the internet at
Ruslan Zakirov's avatar
Ruslan Zakirov committed
27
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
Jesse Vincent's avatar
Jesse Vincent committed
28
29
# 
# 
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# CONTRIBUTION SUBMISSION POLICY:
# 
# (The following paragraph is not intended to limit the rights granted
# to you to modify and distribute this software under the terms of
# the GNU General Public License and is only of importance to you if
# you choose to contribute your changes and enhancements to the
# community by submitting them to Best Practical Solutions, LLC.)
# 
# By intentionally submitting any modifications, corrections or
# derivatives to this work, or any other work intended for use with
# Request Tracker, to Best Practical Solutions, LLC, you confirm that
# you are the copyright holder for those contributions and you grant
# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
# royalty-free, perpetual, license to use, copy, create derivative
# works based on those contributions, and sublicense and distribute
# those contributions and any derivatives thereof.
# 
47
# END BPS TAGGED BLOCK }}}
48

49
50
51
52
53
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.  
# 
# !! DO NOT EDIT THIS FILE !!
#
Jesse Vincent's avatar
Jesse Vincent committed
54

55
56
use strict;

Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
57
58

=head1 NAME
Jesse Vincent's avatar
Jesse Vincent committed
59

Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
60
61
  RT::ACL -- Class Description
 
Jesse Vincent's avatar
Jesse Vincent committed
62
63
=head1 SYNOPSIS

Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
64
  use RT::ACL
Jesse Vincent's avatar
Jesse Vincent committed
65
66
67
68
69
70
71
72

=head1 DESCRIPTION


=head1 METHODS

=cut

73
package RT::ACL;
74

Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
75
76
use RT::SearchBuilder;
use RT::ACE;
77

78
use vars qw( @ISA );
Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
79
@ISA= qw(RT::SearchBuilder);
80
81


Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
82
sub _Init {
83
    my $self = shift;
Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
84
85
    $self->{'table'} = 'ACL';
    $self->{'primary_key'} = 'id';
86
87


Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
88
    return ( $self->SUPER::_Init(@_) );
89
90
}

91

92
=head2 NewItem
93

Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
94
Returns an empty new RT::ACE item
95
96
97

=cut

Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
98
sub NewItem {
99
    my $self = shift;
100
    return(RT::ACE->new($self->CurrentUser));
101
}
Jesse Vincent's avatar
Jesse Vincent committed
102

Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
103
        eval "require RT::ACL_Overlay";
104
        if ($@ && $@ !~ qr{^Can't locate RT/ACL_Overlay.pm}) {
Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
105
106
            die $@;
        };
Jesse Vincent's avatar
Jesse Vincent committed
107

108
109
110
111
112
        eval "require RT::ACL_Vendor";
        if ($@ && $@ !~ qr{^Can't locate RT/ACL_Vendor.pm}) {
            die $@;
        };

Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
113
        eval "require RT::ACL_Local";
114
        if ($@ && $@ !~ qr{^Can't locate RT/ACL_Local.pm}) {
Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
115
116
            die $@;
        };
117

Jesse Vincent's avatar
Jesse Vincent committed
118
119


120

Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
121
=head1 SEE ALSO
Jesse Vincent's avatar
Jesse Vincent committed
122

Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
123
124
This class allows "overlay" methods to be placed
into the following files _Overlay is for a System overlay by the original author,
125
_Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.  
Jesse Vincent's avatar
Jesse Vincent committed
126

Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
127
These overlay files can contain new subs or subs to replace existing subs in this module.
Jesse Vincent's avatar
Jesse Vincent committed
128

129
Each of these files should begin with the line 
Jesse Vincent's avatar
Jesse Vincent committed
130

Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
131
   no warnings qw(redefine);
132

Jesse Vincent's avatar
rt.2.1    
Jesse Vincent committed
133
so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
134

135
RT::ACL_Overlay, RT::ACL_Vendor, RT::ACL_Local
136
137
138

=cut

139

140
1;