projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2eda79f
)
hopefully, finally fix ticket auto-association not getting along with RT ACLs
author
ivan
<ivan>
Fri, 18 Apr 2008 21:19:29 +0000
(21:19 +0000)
committer
ivan
<ivan>
Fri, 18 Apr 2008 21:19:29 +0000
(21:19 +0000)
rt/lib/RT/Ticket_Overlay.pm
patch
|
blob
|
history
rt/lib/RT/URI/freeside.pm
patch
|
blob
|
history
diff --git
a/rt/lib/RT/Ticket_Overlay.pm
b/rt/lib/RT/Ticket_Overlay.pm
index
050278a
..
a51cd16
100644
(file)
--- a/
rt/lib/RT/Ticket_Overlay.pm
+++ b/
rt/lib/RT/Ticket_Overlay.pm
@@
-724,7
+724,7
@@
sub Create {
#first find any requestors with emails but *without* customer targets
my @NoCust_Requestors =
grep { $_->EmailAddress && ! $_->Customers->Count }
#first find any requestors with emails but *without* customer targets
my @NoCust_Requestors =
grep { $_->EmailAddress && ! $_->Customers->Count }
- @{ $self->Requestors->UserMembersObj->ItemsArrayRef };
+ @{ $self->
_
Requestors->UserMembersObj->ItemsArrayRef };
for my $Requestor (@NoCust_Requestors) {
for my $Requestor (@NoCust_Requestors) {
@@
-752,7
+752,7
@@
sub Create {
my @Requestors =
grep { $_->Customers->Count }
my @Requestors =
grep { $_->Customers->Count }
- @{ $self->Requestors->UserMembersObj->ItemsArrayRef };
+ @{ $self->
_
Requestors->UserMembersObj->ItemsArrayRef };
foreach my $Requestor ( @Requestors ) {
foreach my $cust_link ( @{ $Requestor->Customers->ItemsArrayRef } ) {
foreach my $Requestor ( @Requestors ) {
foreach my $cust_link ( @{ $Requestor->Customers->ItemsArrayRef } ) {
@@
-1811,6
+1811,25
@@
sub Requestors {
# }}}
# }}}
+# {{{ sub _Requestors
+
+=head2 _Requestors
+
+Private non-ACLed variant of Reqeustors so that we can look them up for the
+purposes of customer auto-association during create.
+
+=cut
+
+sub _Requestors {
+ my $self = shift:
+
+ my $group = RT::Group->new($RT::SystemUser);
+ $group->LoadTicketRoleGroup(Type => 'Requestor', Ticket => $self->Id);
+ return ($group);
+}
+
+% }}}
+
# {{{ sub Cc
=head2 Cc
# {{{ sub Cc
=head2 Cc
@@
-2535,7
+2554,13
@@
sub _Links {
unless ( $self->{"$field$type"} ) {
$self->{"$field$type"} = new RT::Links( $self->CurrentUser );
unless ( $self->{"$field$type"} ) {
$self->{"$field$type"} = new RT::Links( $self->CurrentUser );
- if ( $self->CurrentUserHasRight('ShowTicket') ) {
+
+ #not sure what this ACL was supposed to do... but returning the
+ # bare (unlimited) RT::Links certainly seems wrong, it causes the
+ # $Ticket->Customers method during creation to return results for every
+ # ticket...
+ #if ( $self->CurrentUserHasRight('ShowTicket') ) {
+
# Maybe this ticket is a merged ticket
my $Tickets = new RT::Tickets( $self->CurrentUser );
# at least to myself
# Maybe this ticket is a merged ticket
my $Tickets = new RT::Tickets( $self->CurrentUser );
# at least to myself
@@
-2552,7
+2577,7
@@
sub _Links {
$self->{"$field$type"}->Limit( FIELD => 'Type',
VALUE => $type )
if ($type);
$self->{"$field$type"}->Limit( FIELD => 'Type',
VALUE => $type )
if ($type);
- }
+
#
}
}
return ( $self->{"$field$type"} );
}
}
return ( $self->{"$field$type"} );
}
diff --git
a/rt/lib/RT/URI/freeside.pm
b/rt/lib/RT/URI/freeside.pm
index
ff1d38d
..
d73dbac
100644
(file)
--- a/
rt/lib/RT/URI/freeside.pm
+++ b/
rt/lib/RT/URI/freeside.pm
@@
-38,8
+38,8
@@
RT::URI::freeside
=head1 DESCRIPTION
=head1 DESCRIPTION
-URI handler for
freeside URIs. See http://www.sisd.com/freeside/ for
-
more information on f
reeside.
+URI handler for
Freeside URIs. See http://www.freeside.biz/ for more
+
information on F
reeside.
=head1 Public subroutines
=head1 Public subroutines