diff options
author | Jesse Vincent <jesse@bestpractical.com> | 2001-06-25 12:19:40 +0400 |
---|---|---|
committer | Jesse Vincent <jesse@bestpractical.com> | 2001-06-25 12:19:40 +0400 |
commit | e8f0b739557d15afee56a29c5db636bb7fa81b70 (patch) | |
tree | 84dbb9c4b7425ce43a50eabc5cb50d15890747af | |
parent | 19a85a8d50c5c026b6be0606915d533f9fd9c2ce (diff) |
Fixed bug in Ticket.pm -> _Links that caused it to return an errorrt-2.0.0.rc2
rather than an empty links object if permission denied.
Bumped version to RC2
-rwxr-xr-x | Makefile | 2 | ||||
-rwxr-xr-x | lib/RT/Ticket.pm | 8 |
2 files changed, 3 insertions, 7 deletions
@@ -6,7 +6,7 @@ PERL = /usr/bin/perl RT_VERSION_MAJOR = 2 RT_VERSION_MINOR = 0 -RT_VERSION_PATCH = 0-RC1 +RT_VERSION_PATCH = 0-RC2 RT_VERSION = $(RT_VERSION_MAJOR).$(RT_VERSION_MINOR).$(RT_VERSION_PATCH) diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm index 8252b12545..d1f6424d2a 100755 --- a/lib/RT/Ticket.pm +++ b/lib/RT/Ticket.pm @@ -1734,13 +1734,9 @@ sub _Links { my $field = shift; my $type =shift || ""; - unless ($self->CurrentUserHasRight('ShowTicket')) { - return (0, "Permission Denied"); - } - - unless (exists $self->{"$field$type"}) { + $self->{"$field$type"} = new RT::Links($self->CurrentUser); + if ($self->CurrentUserHasRight('ShowTicket')) { - $self->{"$field$type"} = new RT::Links($self->CurrentUser); $self->{"$field$type"}->Limit(FIELD=>$field, VALUE=>$self->URI); $self->{"$field$type"}->Limit(FIELD=>'Type', VALUE=>$type) if ($type); } |